Re: Any way to get syntax-highlighted code blocks with Text::MultiMarkdown?

2010-12-07 Thread Dr. Drang
On Mon, Dec 6, 2010 at 10:45 AM, Aristotle Pagaltzis pagalt...@gmx.dewrote:

 There is no need to wedge any of this into
 Markdown itself.


I'm not suggesting the purity of standard Markdown be sullied by my
barbarous addition. I made the suggestion because it solved a problem I had
and might also help the OP.

Recall that the OP is using MultiMarkdown, which has more wedged-in features
than you can count. One more wouldn't even be noticed.
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Any way to get syntax-highlighted code blocks with Text::MultiMarkdown?

2010-12-07 Thread Mike Doherty
On 10-12-07 01:07 PM, Dr. Drang wrote:
 Recall that the OP is using MultiMarkdown, which has more wedged-in
 features than you can count. One more wouldn't even be noticed.

Funnily enough, the *only* feature I needed was ids on headings.

Well, I'll look at post-processing, as it seems to be the best way to
accomplish this.

Thanks for your suggestions,
-Mike
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Any way to get syntax-highlighted code blocks with Text::MultiMarkdown?

2010-12-07 Thread David Chambers
Mike Doherty wrote:

Funnily enough, the *only* feature I needed was ids on headings.


My preferred method of adding ids to headings is to use
*...@id=value}*syntax. For example…

introducti...@id=intro}
===

becomes…

h1 id=introIntroduction/h1

I'm using Python-Markdownhttp://www.freewisdom.org/projects/python-markdown/.
I'm not sure whether other implementations support this syntax. It's worth a
try, though!

David


On 8 December 2010 05:32, Mike Doherty dohe...@cs.dal.ca wrote:

 On 10-12-07 01:07 PM, Dr. Drang wrote:
  Recall that the OP is using MultiMarkdown, which has more wedged-in
  features than you can count. One more wouldn't even be noticed.

 Funnily enough, the *only* feature I needed was ids on headings.

 Well, I'll look at post-processing, as it seems to be the best way to
 accomplish this.

 Thanks for your suggestions,
 -Mike
 ___
 Markdown-Discuss mailing list
 Markdown-Discuss@six.pairlist.net
 http://six.pairlist.net/mailman/listinfo/markdown-discuss

___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Any way to get syntax-highlighted code blocks with Text::MultiMarkdown?

2010-12-06 Thread Dr. Drang
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/
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Any way to get syntax-highlighted code blocks with Text::MultiMarkdown?

2010-12-06 Thread Aristotle Pagaltzis
* Dr. Drang drdr...@gmail.com [2010-12-06 17:10]:
 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.

Markdown spits out HTML. Any highlighter that can fish `pre`
and `code` out of HTML and highlight it will work on the
Markdown’s output. There is no need to wedge any of this into
Markdown itself.

Regards,
-- 
Aristotle Pagaltzis // http://plasmasturm.org/
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Any way to get syntax-highlighted code blocks with Text::MultiMarkdown?

2010-12-02 Thread Mike Doherty
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@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Any way to get syntax-highlighted code blocks with Text::MultiMarkdown?

2010-12-02 Thread David Chambers
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 dohe...@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@six.pairlist.net
 http://six.pairlist.net/mailman/listinfo/markdown-discuss

___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Any way to get syntax-highlighted code blocks with Text::MultiMarkdown?

2010-12-02 Thread Waylan Limberg
On Thu, Dec 2, 2010 at 6:56 PM, David Chambers
david.chambers...@gmail.com wrote:
 I'm not familiar with Text::MultiMarkdown, but I can say that I've
 found 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.

David makes a good point. Although google-code-prettify is not the
only client-side (javascript) solution out there.  I did a write-up
about such things a little while back. While that post does link to a
number of solutions, its a rather long post mostly about why I think
javascript solutions are the better choice, even if they don't (yet)
always offer better output.

[1]: http://achinghead.com/archive/88/syntax-highlighting-web/

-- 

\X/ /-\ `/ |_ /-\ |\|
Waylan Limberg
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss