sirthias / pegdown

A pure-Java Markdown processor based on a parboiled PEG parser supporting a number of extensions
http://pegdown.org
Apache License 2.0
1.29k stars 218 forks source link

Code Block Doesn't Seem To Take Language Syntax #68

Open bradsdavis opened 11 years ago

bradsdavis commented 11 years ago

In Github, putting three ` followed by the language type influences the output.

I would like this to be parsed out; maybe it could set the class on the <code> tag as the syntax, or a data-syntax HTML5 attribute so that a syntax highlighting javascript framework can be employed.

bradsdavis commented 11 years ago

I have implement this and will issue a pull request later today.

Thanks!

jirutka commented 11 years ago

PegDown already supports so called Fenced Code Blocks with the specified language, so this issue can be closed, @sirthias.

ouaibsky commented 9 years ago

Hi

sorry but i try this and it doesn't work

```java
    public interface IRedValidator ...
    public enum EOrderStatus ...  


The block is renderer as classical code block without color syntaxing.
Is there something more to do ?
I used maven site plugin with maven-doxia-markdown plugin that is using pegdown 1.2.1
Thx
Christophe
jerrobertson commented 8 years ago

I'm seeing the same thing as @ouaibsky; adding the language to the code block has no affect.