/** * Overload to enable single-newline paragraphs * https://github.com/github/github-flavored-markdown/blob/gh-pages/index.md#newlines */ function formParagraphs($text) { // Treat single linebreaks as double linebreaks $text = preg_replace('#([^\\n])\\n([^\\n])#', "\$1\n\n\$2", $text); return parent::formParagraphs($text); }