JetBrains / markdown

Markdown parser written in kotlin
Apache License 2.0
682 stars 75 forks source link

Handling of &nbsp and other html entries in gfm #88

Open MarcinAman opened 3 years ago

MarcinAman commented 3 years ago

According to the specification gfm supports html entries like &nbsp. Are they supported by this library? If so, how?

Given a test case:

Hello World! Docs with period issue, e.g. this.

using:

val gfmFlavourDescriptor = GFMFlavourDescriptor()
val markdownAstRoot = IntellijMarkdownParser(gfmFlavourDescriptor).buildMarkdownTreeFromString(testString)

I get a text node from 37 to 52 instead of some code or other form of marker that this fragment contains html entry.

ajalt commented 3 years ago

This is one of the features that hasn't been implemented yet. The ignored test is here: https://github.com/JetBrains/markdown/blob/76fb99fb6b04203f2c821b031c43ef0d202a9445/src/commonTest/kotlin/org/intellij/markdown/CommonMarkSpecTest.kt#L155-L160