evancz / elm-markdown

Markdown parsing within Elm
http://package.elm-lang.org/packages/evancz/elm-markdown/latest
Other
88 stars 7 forks source link

Use CommonMark instead of some loosely defined Markdown flavour #6

Open dumblob opened 9 years ago

dumblob commented 9 years ago

Would it be possible to switch to a well-defined "flavour" of the original Markdown called CommonMark? There are very good JS implementations and I'd recommend markdown-it.

CommonMark continues in the spirit of well-defined typing (which is one of the greatest advantages of Elm) and brings it to the domain of syntax.

jvoigtlaender commented 8 years ago

Indeed, it seems that marked.js does not follow Markdown "rules". For example, it will apply markup to Markdown blocks inside literal HTML blocks. Like in this:

import Markdown

main =
  Markdown.toHtml markdown

markdown = """
<div>
<p>Codes are "p_2014__"* for balance sheet and  "p_2014_2000_"**  for income statement.
....Notes: *as of year end, **span of 14 years.</p></div>
"""

Also consider: https://github.com/chjj/marked/issues/236#issuecomment-23221556

And it seems a bit unclear whether marked.js is still being maintained: https://github.com/chjj/marked/issues/724