Base Header Level meta-data is ignored
I set the MultiMarkdown metadata "Base Header Level: 2" at the beginning of my MultiMarkdown document, but find that Marked is still producing h1 headings for the first level. "Setting Base Header Level: 2" should produce h2 headings for the first level.
This is a problem when trying to match my custom style CSS with the actual website CSS that will eventually be used when the markdown gets published.
Am I doing something wrong? If not, I'd like this to be fixed.
NOTE: I've got MultiMarkdown 3.2 installed. Is Marked using some internal version of MultiMarkdown (rather than the one found in the standard locations used by the MultiMarkdown installer)?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 10 Oct, 2011 11:02 PM
You're not doing anything wrong, but it can't be fixed easily. In order to inject the custom CSS and Javascript for the preview, Marked needs a snippet of HTML as opposed to a complete document. In MMD 3, _any_ metadata triggers a complete document render. This means that--for the purposes of the preview--I have to strip MMD3 metadata (like Base Header) out before rendering. It remains in the output (unless overridden in preferences), but not in the Preview. I do have a parser that determines quote language based on headers, and may be able to set one to force the base header level, but I'll have to see how it goes.
-Brett
2 Posted by davehein on 10 Oct, 2011 11:42 PM
According to the doc, using "Base Header Level" and "Quotes Language" only -- no other meta data -- will generate a snippet. So you could strip all but those two, and still get a snippet.
From the doc (https://github.com/fletcher/peg-multimarkdown/wiki/How-do-I-create-...)
"Metadata that is only intended to affect the way MultiMarkdown processes the output will not trigger a complete document. Currently, this means you can use Base Header Level or Quotes Language and still output a snippet if you don't include any other metadata."
Support Staff 3 Posted by Brett on 11 Oct, 2011 12:07 AM
Noted. I'll add a check for it in the next version.
Support Staff 4 Posted by Brett on 15 Oct, 2011 03:50 AM
1.3.1 officially supports Base Header Level now, and will be released soon.
Brett closed this discussion on 15 Oct, 2011 03:50 AM.