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

Emphasis doesn't work within a word with _ #441

Open
Aloso opened this issue Jul 18, 2023 · 0 comments
Open

Emphasis doesn't work within a word with _ #441

Aloso opened this issue Jul 18, 2023 · 0 comments

Comments

@Aloso
Copy link

Aloso commented Jul 18, 2023

turndown uses _ by default for emphasis (italic text), but this doesn't work within a word.

Bru<em>ss</em>el<em>s</em> is spelled with 3 <em>s</em>'s.
  • Rendered:

    Brussels is spelled with 3 s's.

  • Converted to markdown:

    Bru_ss_el_s_ is spelled with 3 _s_'s.
  • Markdown rendered with CommonMark:

    Bru_ss_el_s_ is spelled with 3 s's.

The problem is that CommonMark only recognizes underscores at word boundaries. To make emphasis work in the above situation, * should be used by default, which CommonMark recognizes even within a word:

Bru*ss*el*s* is spelled with 3 *s*'s.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant