Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Literal HTML in Markdown serialization fails #6

Open
arabello opened this issue Apr 1, 2022 · 1 comment
Open

Literal HTML in Markdown serialization fails #6

arabello opened this issue Apr 1, 2022 · 1 comment
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@arabello
Copy link
Collaborator

arabello commented Apr 1, 2022

next-mdx-remote fails to serialize the Markdown package description when a literal HTML tag is not self-closed, e.g. <br>. After a small investigation it seems there is not ready-to-go plugin to fix it, even though the underlying mdx-js provide a way to correctly render it.

A naive fix was to replace the tag to the corresponding self-closing one, e.g. <br> to </br> at string level. This should be done only for specific tags that are crashing current packages, as it is not a robust solution.

Leaving this open to eventually find a proper fix

@arabello arabello changed the title Literal HTML tag that should be self-closed in Markdown fails to be serialized Literal HTML in Markdown serialization fails Apr 4, 2022
@arabello
Copy link
Collaborator Author

arabello commented Apr 4, 2022

Generalizing this as other issue with HTML tags are emerging:

  • <br> fails in git. Replacing it with <br>
  • <kbd> fails in greek-letters-alt. Replacing it with backquotes.
  • Missing newline fails to properly render the below node (e.g. table in belarusian-letters). No solution found yet

NB: String replacing is a temporary fix. This issue should be addressed using specific remark and rehype plugins or by writing a custom one.

@arabello arabello added the bug Something isn't working label Apr 4, 2022
@arabello arabello added the wontfix This will not be worked on label Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant