Added a field to the Html struct that holds a map[string]string. HtmlRendererWithParameters() then returns an Html struct with the map initialized. The user may then specify <meta.../> tags to be included in the document header when the document is parsed (and HTML_COMPLETE_PAGE is flagged).
With the key being the full attribute of name="..." or http-equiv="...", and value being the unquoted value of the attribute contents="..."
The reason for this was I needed a way to inject <meta.../> tags into a rendered document for one of my projects. I thought, "Doing it after the document is parsed doesn't seem right or efficient, so why not do it during the markdown->html/xhtml translation?".
Added a field to the
Html
struct that holds amap[string]string
.HtmlRendererWithParameters()
then returns anHtml
struct with the map initialized. The user may then specify<meta.../>
tags to be included in the document header when the document is parsed (andHTML_COMPLETE_PAGE
is flagged).With the key being the full attribute of
name="..."
orhttp-equiv="..."
, and value being the unquoted value of the attributecontents="..."
The reason for this was I needed a way to inject
<meta.../>
tags into a rendered document for one of my projects. I thought, "Doing it after the document is parsed doesn't seem right or efficient, so why not do it during the markdown->html/xhtml translation?".