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

Conversion between html and markdown in Rust with whitespace #407

Closed
alunturner opened this issue Dec 15, 2022 · 1 comment
Closed

Conversion between html and markdown in Rust with whitespace #407

alunturner opened this issue Dec 15, 2022 · 1 comment

Comments

@alunturner
Copy link
Contributor

We currently have a slight issue with converting html to markdown in the rust model. Issue is as follows:

  • html can support whitespace inside tags eg <em>hello </em> is valid html and if a user were to click italic, type 'hello ' and then click italic again to disable the italic mode, this is the html they would have input
  • when we convert this to markdown, the output is _hello _
    • this is not valid markdown due to the space before the final underscore
    • this means that if we try to parse that markdown back into html we get the output _hello _

In summary, converting html => markdown => html at the moment is not perfect due to the difference in how the formats handle whitespace at the end of a 'node'.

@jonnyandrew
Copy link
Contributor

Closing as we don't currently aim to produce machine-readable markdown that can do round-trips to/from HTML (see #800).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants