Differential D8953 Diff 21309 src/markup/engine/remarkup/blockrule/PhutilRemarkupEngineRemarkupListBlockRule.php
Changeset View
Changeset View
Standalone View
Standalone View
src/markup/engine/remarkup/blockrule/PhutilRemarkupEngineRemarkupListBlockRule.php
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | final class PhutilRemarkupEngineRemarkupListBlockRule | ||||
* The maximum sub-list depth you can nest to. Avoids silliness and blowing | * The maximum sub-list depth you can nest to. Avoids silliness and blowing | ||||
* the stack. | * the stack. | ||||
*/ | */ | ||||
const MAXIMUM_LIST_NESTING_DEPTH = 12; | const MAXIMUM_LIST_NESTING_DEPTH = 12; | ||||
const START_BLOCK_PATTERN = '@^\s*(?:[-*#]+|1[.)]|\[.?\])\s+@'; | const START_BLOCK_PATTERN = '@^\s*(?:[-*#]+|1[.)]|\[.?\])\s+@'; | ||||
const CONT_BLOCK_PATTERN = '@^\s*(?:[-*#]+|[0-9]+[.)]|\[.?\])\s+@'; | const CONT_BLOCK_PATTERN = '@^\s*(?:[-*#]+|[0-9]+[.)]|\[.?\])\s+@'; | ||||
const STRIP_BLOCK_PATTERN = '@^\s*(?:[-*#]+|[0-9]+[.)])\s*@'; | const STRIP_BLOCK_PATTERN = '@^\s*(?:[-*#]+|[0-9]+[.)])\s*@'; | ||||
public function markupText($text) { | public function markupText($text, $children) { | ||||
$items = array(); | $items = array(); | ||||
$lines = explode("\n", $text); | $lines = explode("\n", $text); | ||||
// We allow users to delimit lists using either differing indentation | // We allow users to delimit lists using either differing indentation | ||||
// levels: | // levels: | ||||
// | // | ||||
// - a | // - a | ||||
▲ Show 20 Lines • Show All 410 Lines • Show Last 20 Lines |