Using Markdown in node help text

In the Creating Nodes Help Style Guide documentation it gives the following Markdown example

### Inputs

: payload (string | buffer) :  the payload of the message to publish.
: *topic* (string)          :  the MQTT topic to publish to.

Which appears in the help text as


This does work as described, but I can't find this format in the Markdown spec, or in the github extensions (though I may just have missed it there). It doesn't work in Obsidian, for example.

What am I missing?

This is a very unique format specific to Node-RED documentation so you would never find it in a public spec.

We use a custom formatter of a very specific nature to simplify the documentation and provide a means of generating HTML in the same vein as the html node-red doc spec.

It simply wouldn't be possible in generic markdown otherwise.

It looks like a Definition List extension of some kind. I can't remember what Markdown library Node-RED uses, is it Markdown-IT? If so, have a look for a plugin.

No, marked

for anyone interested, here is the PR: Render node documentation to node-red style guide when written in markdown. by Steve-Mcl · Pull Request #3169 · node-red/node-red · GitHub

The salient details are:

  • 2 custom renderers
    • descriptionList
    • description
  • The custom renders are used by marked via the line:
    • window._marked.use({extensions: [descriptionList, description] } );
1 Like