Differential D20644 Diff 49250 src/markup/engine/remarkup/blockrule/PhutilRemarkupTableBlockRule.php
Changeset View
Changeset View
Standalone View
Standalone View
src/markup/engine/remarkup/blockrule/PhutilRemarkupTableBlockRule.php
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | foreach ($nodes as $node) { | ||||
return $text; | return $text; | ||||
} | } | ||||
$seen_table = true; | $seen_table = true; | ||||
$out[] = $this->newTable($node); | $out[] = $this->newTable($node); | ||||
} | } | ||||
} | } | ||||
if ($this->getEngine()->isTextMode()) { | |||||
return implode('', $out); | |||||
} else { | |||||
return phutil_implode_html('', $out); | return phutil_implode_html('', $out); | ||||
} | } | ||||
} | |||||
private function newTable(PhutilDOMNode $table) { | private function newTable(PhutilDOMNode $table) { | ||||
$nodes = $table->selectChildrenWithTags( | $nodes = $table->selectChildrenWithTags( | ||||
array( | array( | ||||
'colgroup', | 'colgroup', | ||||
'tr', | 'tr', | ||||
)); | )); | ||||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | foreach ($rows as $row) { | ||||
if (!strlen(trim($content))) { | if (!strlen(trim($content))) { | ||||
continue; | continue; | ||||
} | } | ||||
return $table->newRawString(); | return $table->newRawString(); | ||||
} | } | ||||
$content = $cell->getRawContentString(); | $content = $cell->newRawContentString(); | ||||
$content = $this->applyRules($content); | $content = $this->applyRules($content); | ||||
$cell_specs[] = array( | $cell_specs[] = array( | ||||
'type' => $cell->getTagName(), | 'type' => $cell->getTagName(), | ||||
'content' => $content, | 'content' => $content, | ||||
); | ); | ||||
} | } | ||||
Show All 10 Lines |