Hi,
Would it be possible to add support for correctly syntax highlighting code in markdown blog posts?
I have the iG:Syntax Hiliter plugin <http://blog.igeek.info/wp- plugins/igsyntax-hiliter/> which highlights the code when viewed online, but it would be nice to have the code highlighted in TextMate. The syntax for this plugin is ....
[perl] # perl code here [/perl]
[ruby] # ruby code here [/ruby]
etc.
What would be the best way to do this?
- Luke.
Luke Daley wrote:
Would it be possible to add support for correctly syntax highlighting code in markdown blog posts?
[...]
[perl] # perl code here [/perl]
etc.
What would be the best way to do this?
I think your best bet is to duplicate the markdown grammar and make modifications locally. It's possible though that you could get away with doing it by making a new grammar and inheriting the markdown grammar. See the textmate docs.
Incidentally, what's the point of the [/perl] part. It seems like the end of a code block is pretty unambiguous…
-Jacob
On 06/03/2007, at 12:12 PM, Jacob Rus wrote:
I think your best bet is to duplicate the markdown grammar and make modifications locally. It's possible though that you could get away with doing it by making a new grammar and inheriting the markdown grammar. See the textmate docs.
Will do, thanks.
Incidentally, what's the point of the [/perl] part. It seems like the end of a code block is pretty unambiguous…
That is just what the plugin dictates. It seems necessary to me though, considering that you don't have to indent the code block.
- Luke.
If you'd be willing to share your grammar file once you've succeeded, I'd love to see it. I've gotten rudimentary support for my excerpt and slug plugins, but have only been able to highlight the bracketed tags, not the text in-between. I suck at grammar files ;).
Thanks, Brett
On Mar 5, 2007, at 8:18 PM, Luke Daley wrote:
On 06/03/2007, at 12:12 PM, Jacob Rus wrote:
I think your best bet is to duplicate the markdown grammar and make modifications locally. It's possible though that you could get away with doing it by making a new grammar and inheriting the markdown grammar. See the textmate docs.
Will do, thanks.
Incidentally, what's the point of the [/perl] part. It seems like the end of a code block is pretty unambiguous…
That is just what the plugin dictates. It seems necessary to me though, considering that you don't have to indent the code block.
- Luke.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Mar 5, 2007, at 9:12 PM, Jacob Rus wrote:
Luke Daley wrote:
Would it be possible to add support for correctly syntax highlighting code in markdown blog posts?
[...]
[perl] # perl code here [/perl] etc. What would be the best way to do this?
I think your best bet is to duplicate the markdown grammar and make modifications locally. It's possible though that you could get away with doing it by making a new grammar and inheriting the markdown grammar. See the textmate docs.
Any reason why we couldn't add those two cases to the official Blogging -- Markdown syntax? There's a similar one with [tex] I believe, btw.
-Jacob
Haris Skiadas Department of Mathematics and Computer Science Hanover College