Mike Doherty
2010-Dec-02 23:40 UTC
Any way to get syntax-highlighted code blocks with Text::MultiMarkdown?
Hello, I'm using Text::MultiMarkdown in my website, and I would like to know if there is any way to get syntax highlighting in code blocks. Thanks, -Mike Doherty
David Chambers
2010-Dec-02 23:56 UTC
Any way to get syntax-highlighted code blocks with Text::MultiMarkdown?
I'm not familiar with Text::MultiMarkdown, but I can say that I've found google-code-prettify <http://code.google.com/p/google-code-prettify/> to be a good fit with Markdown due to the fact that it acts upon vanilla <pre> blocks (unlike SyntaxHighlighter, for example, which only acts upon elements with a particular class name. If you're interested in seeing this duo in action, have a look at: - http://d?d.ws/70/ <http://xn--dd-7la.ws/70/> *(the rendered page with highlighting)* - http://d?d.ws/70/m/ <http://xn--dd-7la.ws/70/m/> *(the page's Markdown) * David On 3 December 2010 10:40, Mike Doherty <doherty at cs.dal.ca> wrote:> Hello, > > I'm using Text::MultiMarkdown in my website, and I would like to know if > there is any way to get syntax highlighting in code blocks. > > Thanks, > -Mike Doherty > _______________________________________________ > Markdown-Discuss mailing list > Markdown-Discuss at six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20101203/181fec4c/attachment.htm>
Dr. Drang
2010-Dec-06 16:08 UTC
Any way to get syntax-highlighted code blocks with Text::MultiMarkdown?
I just added syntax highlighting to my blog by wedging a call to Pygments into my fork of PHP Markdown Extra (yet another abuse of Michel's code). You could do a similar thing with MultiMarkdown by changing the _DoCodeBlocks function. My fork of PHP Markdown Extra is here: https://github.com/drdrang/php-markdown-extra-math The syntax highlighting is in the "pygments" branch. A brief description of how I use it is here: http://www.leancrew.com/all-this/2010/12/syntax-highlighting/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20101206/00ccd878/attachment.htm>