You are here

protected function Markdown::doHardBreaks in Express 8

* Do hard breaks *

Parameters

string $text: * @return string

File

vendor/michelf/php-markdown/Michelf/Markdown.php, line 630

Class

Markdown
Markdown Parser Class

Namespace

Michelf

Code

protected function doHardBreaks($text) {
  if ($this->hard_wrap) {
    return preg_replace_callback('/ *\\n/', array(
      $this,
      '_doHardBreaks_callback',
    ), $text);
  }
  else {
    return preg_replace_callback('/ {2,}\\n/', array(
      $this,
      '_doHardBreaks_callback',
    ), $text);
  }
}