| @@ 129-138 (lines=10) @@ | ||
| 126 | ], |
|
| 127 | strlen($matches[0]) |
|
| 128 | ]; |
|
| 129 | } else { |
|
| 130 | // remove all starting [ markers to avoid next one to be parsed as link |
|
| 131 | $result = '[['; |
|
| 132 | $i = 2; |
|
| 133 | while (isset($markdown[$i]) && $markdown[$i] == '[') { |
|
| 134 | $result .= '['; |
|
| 135 | $i++; |
|
| 136 | } |
|
| 137 | return [['text', $result], $i]; |
|
| 138 | } |
|
| 139 | } |
|
| 140 | ||
| 141 | /** |
|
| @@ 171-180 (lines=10) @@ | ||
| 168 | ], |
|
| 169 | strlen($matches[0]) |
|
| 170 | ]; |
|
| 171 | } else { |
|
| 172 | // remove all starting [ markers to avoid next one to be parsed as link |
|
| 173 | $result = '{{'; |
|
| 174 | $i = 2; |
|
| 175 | while (isset($markdown[$i]) && $markdown[$i] == '{') { |
|
| 176 | $result .= '['; |
|
| 177 | $i++; |
|
| 178 | } |
|
| 179 | return [['text', $result], $i]; |
|
| 180 | } |
|
| 181 | } |
|
| 182 | ||
| 183 | protected function renderUrl($block) |
|