DownmarkerWPF icon indicating copy to clipboard operation
DownmarkerWPF copied to clipboard

SyntaxHighlighter Support

Open rposbo opened this issue 13 years ago • 3 comments

Can you introduce support for Alex Gorbatchev's SyntaxHighlighter (https://github.com/alexgorbatchev/SyntaxHighlighter) in the preview window?

rposbo avatar Jan 13 '12 08:01 rposbo

To initial SyntaxHighlighter, am I right in assuming you need to have something like class="brush: php; highlight: [5, 15]; html-script: true" on the code blocks to get it to trigger, compared to Prettify which works on any old code block?

The latter "just works", the former gives you a lot more control over the language being highlighted.

ghost avatar Jan 14 '12 23:01 ghost

Oh, my bad, Prettify is meant to be on particular classes too. I got around that on my blog with a bit of JS, maybe the same can be done of SyntaxHighlighter

ghost avatar Jan 14 '12 23:01 ghost

syntaxhighlighter allows you to use really simple tags to enable language-specific highlighting; e.g., [powershell][/powershell] and [csharp][/csharp]

I use this a lot on my blog and always use WLW to write the posts and then log in to Wordpress to edit the post to add in the code highlighting. Annoying. I might just be a case of popping in the syntaxhighlighter js into the preview area of markpad; I'll have a looksee myself, just in case.

rposbo avatar Jan 15 '12 15:01 rposbo