Example #1
0
 /**
  * @inheritdocs
  *
  * Parses a newline indicated by two spaces on the end of a markdown line.
  */
 protected function renderText($text)
 {
     if ($this->enableNewlines) {
         return preg_replace("/(  \n|\n)/", $this->html5 ? "<br>\n" : "<br />\n", $text[1]);
     } else {
         return parent::renderText($text);
     }
 }
Example #2
0
 /**
  * @inheritdocs
  *
  * Parses a newline indicated by two spaces on the end of a markdown line.
  */
 protected function renderText($text)
 {
     if ($this->enableNewlines) {
         $br = $this->html5 ? "<br>\n" : "<br />\n";
         return strtr($text[1], ["  \n" => $br, "\n" => $br]);
     } else {
         return parent::renderText($text);
     }
 }