/ xojo

CommonMark (iOS)

I know I only just released an open source module for converting Markdown to HTML for Xojo iOS but I'm going to do it again. The approach is the same (i.e it uses javascript embedded in an iOSHTMLViewer to do the work) but
I've changed the underlying javascript from remarkable.js to
commonmark.js. This is for two reasons:

  1. commonmark.js is the reference javascript implementation of the CommonMark Markdown spec
  2. It produces identical output to the reference C implementation (cmark) that I'm using in the recently released desktop Markdown to HTML parser


CommonMark.Initialise() ' need only call once per project

dim md as Text = "This is **bold** text."
dim html as Text = CommonMark.ToHTML(md) ' This is <strong>bold</strong> text.

Find the code on GitHub.