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

All Spaces Are Removed and Other Issues #156

Closed carc1n0gen closed 8 years ago

carc1n0gen commented 9 years ago

I am trying to use pegdown in a project where I write web pages in markdown and they are compiled/cached at runtime. For some reason in the generated html there are NO spaces/newlines and no tags are being created beyond the first h2 (which isn't closed) and hyperlinks.

markdown

html

From what I have observed pegdown doesn't support github style code where you indicate the language, but this shouldn't be the cause for all of the other mess.

l-cornelius-dol commented 9 years ago

This must be a fault in the way you read the file (or preprocess it) before handing it over to PegDown. I do exactly this for my web site and it works perfectly with PegDown.