node.jsmarkdownassemble

Syntax highlighting Markdown via Assemble.io - incomplete


Am I missing something? I have a rendering pipeline set up with assemble.io via an express server and everything is rendering as expected. However, when I add in bracket fences for Markdown there seems to be an issue with the syntax highlighting. It does drop the code into <code> and <pre> tags as expected and when I add in the language identifier after the top fence it does add in the class="language-[LANG] like you would think it would, however, it does nothing to the code within it (e.g. wrapping the tag elements, attributes, important names, etc. in span tags).

Is there a helper I need to add to the pipeline and pass the file through? So far I've tried adding prismjs, but that flattened the entire page into code (not ideal).

Result: &lt;a href=&quot;&quot;&gt;this is the link&lt;/a&gt;

Expected: &lt;<span class="some-tag-class">a</span> <span class="some-name-class">href</span>=&quot;&quot;&gt;this is the link&lt;/a&gt;


Solution

  • Looking at the markdown documentation directly or at the assemble.io documentation does no good.

    It's clearly listed on the helper-markdown github/npm sites respectivly.