Using snap , I wrote a splice to create markdown text using this function:
markdownToHTML :: T.Text -> [Node] markdownToHTML = renderHtmlNodes . (writeHtml writeOpts) . readMarkdown readOpts . T.unpack where readOpts = defaultParserState writeOpts = defaultWriterOptions { writerStandalone = False , writerHtml5 = True , writerStrictMarkdown = False }
Now when I, for example, give him this markdown
# Hi Lorem ipsum something somthing
It creates this HTML code:
<h1 id='hi'>Hi </h1> <p> Lorem ipsum something somthing # Stuff <a href='http://twitter.com/'>a link</a></p>
No matter how many lines I put in front of #
, it still just wedged into the paragraph.
Oddly enough, if I uncheck the same mark in the pandoc demo site, it produces the correct HTML output.
The full code for my project can be found here , if necessary.
Lanbo source share