burodepeper / language-markdown

Add support for Markdown to Atom (including Github flavored, Markdown Extra, CriticMark, YAML/TOML front-matter, and R Markdown), and smart behavior to lists.
https://atom.io/packages/language-markdown
MIT License
119 stars 295 forks source link

Prevent matching of invalid HTML tags #234

Closed kylebarron closed 6 years ago

kylebarron commented 6 years ago

Here's a simple idea to fix https://github.com/burodepeper/language-markdown/issues/178.

image

burodepeper commented 6 years ago

Breaks the integration tests regarding autolinks, such as <https://www.github.com>, hmm, see: https://github.github.com/gfm/#autolinks

Maybe best way to solve all these issues is to have a general selector for opening and closing tags, without any added logic. An additional step could make a distinction between various types of tags/links/etc. What do you think?

kylebarron commented 6 years ago

Breaks the integration tests regarding autolinks

That would be fixed by putting include: '#links' above include: '#html'.

burodepeper commented 6 years ago

I think you are right. Would you mind changing that? Let's see if something else fails.

burodepeper commented 6 years ago

I've tried your approach, and ran into some additional issues. See b1a1da1 for my implementation and tests. Thanks for your help!

kylebarron commented 6 years ago

Sounds good! I hope my ideas helped!