Differential D8953 Diff 21309 src/markup/engine/remarkup/blockrule/PhutilRemarkupEngineRemarkupInterpreterRule.php
Changeset View
Changeset View
Standalone View
Standalone View
src/markup/engine/remarkup/blockrule/PhutilRemarkupEngineRemarkupInterpreterRule.php
Show All 21 Lines | if (preg_match(self::START_BLOCK_PATTERN, $lines[$cursor])) { | ||||
$num_lines++; | $num_lines++; | ||||
$cursor++; | $cursor++; | ||||
} | } | ||||
} | } | ||||
return $num_lines; | return $num_lines; | ||||
} | } | ||||
public function markupText($text) { | public function markupText($text, $children) { | ||||
$lines = explode("\n", $text); | $lines = explode("\n", $text); | ||||
$first_key = head_key($lines); | $first_key = head_key($lines); | ||||
$last_key = last_key($lines); | $last_key = last_key($lines); | ||||
while (trim($lines[$last_key]) === '') { | while (trim($lines[$last_key]) === '') { | ||||
unset($lines[$last_key]); | unset($lines[$last_key]); | ||||
$last_key = last_key($lines); | $last_key = last_key($lines); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |