I was reading http://github.github.com/github-flavored-markdown/
I would like to implement that “Newline modification” in PHP Markdown:
Best I could think of is:
$my_html = Markdown($my_text);
$my_html = preg_replace("/\n{1}/", "<br/>", $my_html);
But this runs very unexpectable.
Look for line in your markdown file:
and change the preg pattern below it from:
to:
Or you can just extend the markdown class, redeclare ‘doHardBreaks’ function, and change the return into something like code above
Regards, Achmad