Paragraph tags around <div> blocks

Sherwood Botsford sgbotsford at gmail.com
Sat Mar 7 12:45:26 EST 2009


The MMD package has a setable item markdown_in_html_blocks.

I hacked the code to make this default on. At the same time, I turned
off img_ids and heading_ids.

The last two worked. Told me that I was changing things in the right place.

Didn't seem to matter what value I gave markdown_in_html_blocks. Made
no difference in the behaviour.

Manually taking <div> out of the list of block level elements however
did allow markdown on stuff inside div blocks
but also resulted in div tags being paragraph formatted. I suspect
that getting markdown_in_html_blocks working would result in all tags
getting so wrapped.

Looking deeper at the code, the regexen are mind numbingly complex to
one of my meager skills.
It's not clear to me how to set up a tag that is ignored, but whose
contents are processed.

At this point my workaround will likely be to put some dummy variable
in place such as DIV-pic4 on a line by itself. let it get turned into
<p>DIV-pic4</p> then do a post process substitution that replaces the
line with the correct div tag.

--
Sherwood Botsford
Sherwood's Forests
Warburg, Alberta T0C 2T0
http://www.sherwoods-forests.com
780-848-2548


More information about the Markdown-Discuss mailing list