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

Angle brackets not escaped in Markdown output #17

Open
telotortium opened this issue Jul 29, 2021 · 1 comment
Open

Angle brackets not escaped in Markdown output #17

telotortium opened this issue Jul 29, 2021 · 1 comment

Comments

@telotortium
Copy link

For example, the text <h1>1. Hello world</h1> is copied to the Markdown output <h1>1. Hello world</h1>, rather than the proper escaped version \<h1\>1. Hello world\</h1\>. I've filed a bug to turndown, since it looks like they're responsible for the escaping: mixmark-io/turndown#395

@notlmn
Copy link
Owner

notlmn commented Jul 30, 2021

This is because if you don't have everything selected (to the closest parent), everything would be considered plain text.

<h1>1. Hello world</h1> out of context is considered plain text, not piece of code. This isn't a bug in turndown, but is a nice feature for this to see what the closest parent is and use that instead from the extensions end.

I haven't touched the codebase in over a year, and don't remember most of the internals, so I might be wrong at multiple levels. I'll have a look when possible, or feel free to yourself.

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

2 participants