Lines Matching refs:block

5 use cebe\markdown\block\TableTrait;
20 use block\TableTrait;
21 use block\FencedCodeTrait;
109 $block = [
117 $block['attributes'] = substr($line, $pos);
126 $block['content'] = implode("\n", $content);
127 return [$block, $i];
130 protected function renderCode($block) argument
132 $attributes = $this->renderAttributes($block);
134 . htmlspecialchars($block['content'] . "\n", ENT_NOQUOTES | ENT_SUBSTITUTE, 'UTF-8')
141 protected function renderHeadline($block) argument
143 foreach($block['content'] as $i => $element) {
145 unset($block['content'][$i]);
146 $block['attributes'] = $element[1];
149 $tag = 'h' . $block['level'];
150 $attributes = $this->renderAttributes($block);
151 return "<$tag$attributes>" . rtrim($this->renderAbsy($block['content']), "# \t") . "</$tag>\n";
154 protected function renderAttributes($block) argument
157 if (isset($block['attributes'])) {
158 $attributes = preg_split('/\s+/', $block['attributes'], -1, PREG_SPLIT_NO_EMPTY);
194 protected function renderSpecialAttributes($block) argument
196 return '{' . $block[1] . '}';
220 protected function renderLink($block) argument
222 if (isset($block['refkey'])) {
223 if (($ref = $this->lookupReference($block['refkey'])) !== false) {
224 $block = array_merge($block, $ref);
226 if (strncmp($block['orig'], '[', 1) === 0) {
227 return '[' . $this->renderAbsy($this->parseInline(substr($block['orig'], 1)));
229 return $block['orig'];
232 $attributes = $this->renderAttributes($block);
233 return '<a href="' . htmlspecialchars($block['url'], ENT_COMPAT | ENT_HTML401, 'UTF-8') . '"'
234 …. (empty($block['title']) ? '' : ' title="' . htmlspecialchars($block['title'], ENT_COMPAT | ENT_H…
235 . $attributes . '>' . $this->renderAbsy($block['text']) . '</a>';
238 protected function renderImage($block) argument
240 if (isset($block['refkey'])) {
241 if (($ref = $this->lookupReference($block['refkey'])) !== false) {
242 $block = array_merge($block, $ref);
244 if (strncmp($block['orig'], '![', 2) === 0) {
245 return '![' . $this->renderAbsy($this->parseInline(substr($block['orig'], 2)));
247 return $block['orig'];
250 $attributes = $this->renderAttributes($block);
251 return '<img src="' . htmlspecialchars($block['url'], ENT_COMPAT | ENT_HTML401, 'UTF-8') . '"'
252 …. ' alt="' . htmlspecialchars($block['text'], ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE, 'UTF-8') …
253 …. (empty($block['title']) ? '' : ' title="' . htmlspecialchars($block['title'], ENT_COMPAT | ENT_H…