Path: blob/master/src/infrastructure/markup/blockrule/PhutilRemarkupQuotesBlockRule.php
12241 views
<?php12final class PhutilRemarkupQuotesBlockRule3extends PhutilRemarkupQuotedBlockRule {45public function getMatchingLineCount(array $lines, $cursor) {6$pos = $cursor;78if (preg_match('/^>/', $lines[$pos])) {9do {10++$pos;11} while (isset($lines[$pos]) && preg_match('/^>/', $lines[$pos]));12}1314return ($pos - $cursor);15}1617public function extractChildText($text) {18return array('', $this->normalizeQuotedBody($text));19}2021public function markupText($text, $children) {22if ($this->getEngine()->isTextMode()) {23return $this->getQuotedText($children);24}2526$attributes = array();27if ($this->getEngine()->isHTMLMailMode()) {28$style = array(29'border-left: 3px solid #a7b5bf;',30'color: #464c5c;',31'font-style: italic;',32'margin: 4px 0 12px 0;',33'padding: 4px 12px;',34'background-color: #f8f9fc;',35);3637$attributes['style'] = implode(' ', $style);38}3940return phutil_tag(41'blockquote',42$attributes,43$children);44}4546}474849