Markdown Helper

The Markdown Helper, contributed by Andre Alves Garzia, contains functions dealing with "Markdown", a software tool written in Perl, that converts plain text (formatted with the Markdown syntax) to structurally valid XHTML (or HTML). Please read about Markdown at Daring Fireball.

Loading this Helper

This helper is loaded using the following code:

rigLoadHelper "markdown"

The functions:

rigMarkdownAvailable()

Use this function to check if the Markdown engine (Markdown.pl) is available.

if rigMarkdownAvailable() then
  # Code...
end if

This function returns true or false.

rigMarkdownVersion()

This function, you guessed it, returns the version of the installed Markdown engine.

rigMarkdown(pPlainText, pHTML4Flag)

This function is a wrapper for the Markdown engine to convert plain text to structurally valid XHTML (or HTML).

Parameters

if rigMarkdownAvailable() then
  put rigMarkdown(tMDstring) into gData["mdOutput"]
end if

This converts Markdown formatted plain text to XHTML.