@@ 86-94 (lines=9) @@ | ||
83 | $this->references[$label] = [ |
|
84 | 'url' => $this->replaceEscape($matches[2]), |
|
85 | ]; |
|
86 | if (isset($matches[3])) { |
|
87 | $this->references[$label]['title'] = $matches[3]; |
|
88 | } else { |
|
89 | // title may be on the next line |
|
90 | if (isset($lines[$current + 1]) && preg_match('/^\s+[\(\'"](.+?)[\)\'"]\s*$/', $lines[$current + 1], $matches)) { |
|
91 | $this->references[$label]['title'] = $matches[1]; |
|
92 | $current++; |
|
93 | } |
|
94 | } |
|
95 | if (isset($matches[5])) { |
|
96 | $this->references[$label]['attributes'] = $matches[5]; |
|
97 | } |
@@ 271-279 (lines=9) @@ | ||
268 | $this->references[$label] = [ |
|
269 | 'url' => $this->replaceEscape($matches[2]), |
|
270 | ]; |
|
271 | if (isset($matches[3])) { |
|
272 | $this->references[$label]['title'] = $matches[3]; |
|
273 | } else { |
|
274 | // title may be on the next line |
|
275 | if (isset($lines[$current + 1]) && preg_match('/^\s+[\(\'"](.+?)[\)\'"]\s*$/', $lines[$current + 1], $matches)) { |
|
276 | $this->references[$label]['title'] = $matches[1]; |
|
277 | $current++; |
|
278 | } |
|
279 | } |
|
280 | $current++; |
|
281 | } |
|
282 | return [false, --$current]; |