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 217 forks source link

Language definition not working in Fenced Code Blocks #142

Closed sameersingh closed 10 years ago

sameersingh commented 10 years ago

The following doesn't seems to be working.

val p = new org.pegdown.PegDownProcessor()
val md = "```scala\ndef f(x:Int) = x*x\n```"
p.markdownToHtml(md)

results in the following wrong output:

<p><code>scala
def f(x:Int) = x*x
</code></p>

Why is this not working as intended?

billliu1992 commented 10 years ago

I responded in #141 about turning on Extensions.FENCED_CODE_BLOCK. If you do that, it should render correctly.

sameersingh commented 10 years ago

Works!