| @@ 124-132 (lines=9) @@ | ||
| 121 | * Parses an & or a html entity definition. |
|
| 122 | * @marker & |
|
| 123 | */ |
|
| 124 | protected function parseEntity($text) |
|
| 125 | { |
|
| 126 | // html entities e.g. © © © |
|
| 127 | if (preg_match('/^&#?[\w\d]+;/', $text, $matches)) { |
|
| 128 | return [['inlineHtml', $matches[0]], strlen($matches[0])]; |
|
| 129 | } else { |
|
| 130 | return [['text', '&'], 1]; |
|
| 131 | } |
|
| 132 | } |
|
| 133 | ||
| 134 | /** |
|
| 135 | * renders a html entity. |
|
| @@ 186-192 (lines=7) @@ | ||
| 183 | /** |
|
| 184 | * @marker { |
|
| 185 | */ |
|
| 186 | protected function parseSpecialAttributes($text) |
|
| 187 | { |
|
| 188 | if (preg_match("~$this->_specialAttributesRegex~", $text, $matches)) { |
|
| 189 | return [['specialAttributes', $matches[1]], strlen($matches[0])]; |
|
| 190 | } |
|
| 191 | return [['text', '{'], 1]; |
|
| 192 | } |
|
| 193 | ||
| 194 | protected function renderSpecialAttributes($block) |
|
| 195 | { |
|