php-markdown icon indicating copy to clipboard operation
php-markdown copied to clipboard

code syntax hightlight

Open flashpixx opened this issue 9 years ago • 2 comments

Can you add a "source code syntaxhighlighter", so that source code blocks are colored? IMHO http://qbnz.com/highlighter/ is a nice framework to do this for different languages.

I can create a pull request maybe

flashpixx avatar Dec 18 '14 15:12 flashpixx

Same feature requesting here, as it's supported by markdownlint and Github.

iigmir avatar Dec 19 '19 08:12 iigmir

You can use fenced code block with a language specifier if you're using the MarkdownExtra parser.

I'm not going to add a dependency to another library for this, but you should be able to set the code_block_content_func configuration variable on the parser to a function that'll color-highlight the content of the code block. More documentation on this page.

michelf avatar Dec 19 '19 14:12 michelf