Hi folks, thanks for the useful code! I've added some functionality to PHP Markdown Extra and PHP SmartyPants. Diffs attached. For PHP Markdown Extra: *A new config option, MARKDOWN_HEADER_BASE, which sets the largest header level that Markdown can generate and defaults to 1; useful if you use <h1> for site-wide elements and want Markdown-generated headers to start at <h2>. It will use <h6> instead of trying to generate <h7>, <h8>, &c. *A new config option, MARKDOWN_STRIP_UNRESOLVED_FNS, which will cause unresolved footnote references to be stripped instead of left in the output text uninterpreted and defaults to false; useful when Markdown is being run over post excerpts or if you use features like <!-- more --> to only show part of the post on the front page. For Smartypants: *1/4, 1/2, and 3/4 will be replaced with fraction entities. -------------- next part -------------- A non-text attachment was scrubbed... Name: markdown.diff Type: application/octet-stream Size: 2241 bytes Desc: not available Url : <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20071204/1d28c3bd/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: smartypants.diff Type: application/octet-stream Size: 2765 bytes Desc: not available Url : <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20071204/1d28c3bd/attachment-0001.obj>
On Dec 4, 2007 10:56 PM, Matthew Sachs <matthewg at zevils.com> wrote:> Hi folks, thanks for the useful code! > > I've added some functionality to PHP Markdown Extra and PHP > SmartyPants. Diffs attached. > > For PHP Markdown Extra: > > *A new config option, MARKDOWN_HEADER_BASE, which sets the largest > header level that Markdown can generate and defaults to 1; useful if > you use <h1> for site-wide elements and want Markdown-generated > headers to start at <h2>. It will use <h6> instead of trying to > generate <h7>, <h8>, &c.Interesting. I was just working on somthing similar for python-markdown yesterday. I cleaned it up this evening and was about to release it, but I left off the catch for <h7> etc. Back to work...> > *A new config option, MARKDOWN_STRIP_UNRESOLVED_FNS, which will cause > unresolved footnote references to be stripped instead of left in the > output text uninterpreted and defaults to false; useful when Markdown > is being run over post excerpts or if you use features like <!-- more > --> to only show part of the post on the front page. > > For Smartypants: > > *1/4, 1/2, and 3/4 will be replaced with fraction entities. > > _______________________________________________ > Markdown-Discuss mailing list > Markdown-Discuss at six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss > >-- ---- Waylan Limberg waylan at gmail.com