Brett on 03 Aug, 2012 07:45 AM
Under Behavior preferences, turn on "Process HTML files as
Markdown". That triggers the ability to render Markdown within
block-level HTML tags. It's labeled "Not recommended" because if
you open a file with a lot of HTML (as in an HTML file), it will
crash the MultiMarkdown renderer. If your file is primarily
Markdown with a few span tags in it, it will be fine.
on 03 Aug, 2012 03:39 PM
Yes. Thank you Brett. I already tried that.
But that setting causes code inside code blocks to be treated as markdown.
For example, successive comment blocks (/* ... */) convert the */ ... /*
sequence as markdown, converting the asterisks to HTML emphasis. So your
"solution" simply trades one error for another.
The real problem is that Marked is not treating HTML5 block level tags as it
should. I had the same problem using PHP Markdown Extra, but was able to add
the HTML5 elements to the list of block-level tags to get it working.
Sadly, I know enough to fix PHP code, but cannot fix or use your product,
which is useless to me as it stands.
Brett on 03 Aug, 2012 03:52 PM
I'm afraid I don't get it. Either you want Markdown rendered, or you don't. You seem to be asking for some kind of hybrid.
`/* ... */` are CSS comments. They wouldn't be recognized as HTML comments, and if you wanted them to actually display you'd need to put them inside of code blocks. What system is it that you're using that _does_ handle this? And can you post a full block of sample code as well as a screenshot of how it's supposed to render?
on 03 Aug, 2012 11:15 PM
> if you wanted them to actually display you'd need to put them inside of
> code blocks.
But I had said:
> But that setting causes code inside code blocks to be treated as markdown.
We seem to be talking at cross purposes here.
Yes. I *do* want code inside code blocks to display CSS comments - with your
previously suggested setting they do not. I also want markdown inside HTML5
block elements to honor the `markdown=1` attribute. That does not work--it
only works for HTML 4.1 block elements, like `<div>`.
Apart from this bug, Marked looks great--which is why I purchased it.
At the moment, I use PHP Markdown Extra + SmartyPants Typographer that gies
me what I am asking Marked to do. But Marked would be so much better--if it
processed Markdown correctly. :\
on 04 Aug, 2012 12:59 AM
Just to be super clear-- the code block I posted in my original query is not
processed correctly. According to section 4.13 "Raw HTML" of your User
Guide, the markdown inside the code block should be processed. It is not.
Brett on 04 Aug, 2012 01:13 AM
I believe the confusion may be because I updated the MMD install
for the next version and have already included an array of HTML5
elements for handling. So my test of your initial code block
If that's not what you're seeing then my mistake for forgetting
If you provide me with a full code sample---with CSS comments
and all---along with a screenshot of how it appears on your blog,
I'm happy to help you get set up with a custom processor or other
solution until the next version is ready.
on 06 Aug, 2012 02:36 AM
Thanks for the screen shot, Brett. That is indeed what I want, but is not
what I get. Adding the array of HTML5 elements should do it.
It's only when I turn on "Process HTML files as Markdown" as you suggested
that *all* Markdown is processed, even inside a CSS code block. Obviously I
won't use that option. So that won't be a problem.
I look forward to the release with the HTML5 elements added.
Thanks for your help.