elm-markdown icon indicating copy to clipboard operation
elm-markdown copied to clipboard

Use CommonMark instead of some loosely defined Markdown flavour

Open dumblob opened this issue 10 years ago • 1 comments

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.

dumblob avatar Jun 21 '15 16:06 dumblob

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

jvoigtlaender avatar Mar 10 '16 06:03 jvoigtlaender