Differential D8953 Diff 21309 src/markup/engine/remarkup/blockrule/PhutilRemarkupEngineRemarkupLiteralBlockRule.php
Changeset View
Changeset View
Standalone View
Standalone View
src/markup/engine/remarkup/blockrule/PhutilRemarkupEngineRemarkupLiteralBlockRule.php
Show All 18 Lines | if (preg_match("/^%%%/", $lines[$cursor])) { | ||||
} | } | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
return $num_lines; | return $num_lines; | ||||
} | } | ||||
public function markupText($text) { | public function markupText($text, $children) { | ||||
$text = preg_replace('/%%%\s*$/', '', substr($text, 3)); | $text = preg_replace('/%%%\s*$/', '', substr($text, 3)); | ||||
if ($this->getEngine()->isTextMode()) { | if ($this->getEngine()->isTextMode()) { | ||||
return $text; | return $text; | ||||
} | } | ||||
$text = phutil_split_lines($text, $retain_endings = true); | $text = phutil_split_lines($text, $retain_endings = true); | ||||
return phutil_implode_html(phutil_tag('br', array()), $text); | return phutil_implode_html(phutil_tag('br', array()), $text); | ||||
} | } | ||||
} | } |