Strange issue with XHTML header
Hey guys, I'm having a strange issue with Marked when I try to use and XHTML header to include MathJax. Basically it skips the first line of my markdown. I've attached a small example where it happens. The strange thing is, if I switch the order of the title and xhtml header, things work just fine! Anyone know if I'm doing something wrong, or if there's a bug in Marked? Thanks!
- Question.md 214 Bytes
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 03 Feb, 2012 08:40 PM
Marked strips most headers when rendering as they trigger a full document render in MultiMarkdown and that makes it impossible to create valid markup with the results. In this case, it's improperly locating the headers because it also strips out script tags. I might need to switch the order in which it does that. However, MathJax include is a built-in feature of Marked, is there a reason you're including it separately?
-Brett
2 Posted by Zachary Harmany on 06 Feb, 2012 06:29 PM
Thanks for the reply!
I see, is there anything I could do to make sure it doesn't strip out the first line as well? One reason I have for including the XHTML headers is using my own MathJax installation. This lets me use it without internet access. Also this fork allows equation numbering:
https://github.com/mathjax/MathJax/issues/71
Cheers,
-Zac
Support Staff 3 Posted by Brett on 06 Feb, 2012 06:50 PM
I fixed the first line issue for the version currently in beta. It will be available soon.
If you turn off the Include MathJax feature in preferences, and then add your own either in XHTML Header: or directly in the body, it *should* be pulled out and added to the end of the rendered document automatically. Until the new version is out, just make sure that you have your headers in the order that doesn't strip the first line. Let me know if there's an issue I'm not aware of and I'll make sure it's fixed in the new version.
-Brett