[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 3 /* 4 * @package s9e\TextFormatter 5 * @copyright Copyright (c) 2010-2019 The s9e Authors 6 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 7 */ 8 namespace s9e\TextFormatter\Plugins\Litedown\Parser\Passes; 9 class LinkReferences extends AbstractPass 10 { 11 public function parse() 12 { 13 if ($this->text->indexOf(']:') === \false) 14 return; 15 $regexp = '/^\\x1A* {0,3}\\[([^\\x17\\]]+)\\]: *([^[\\s\\x17]+ *(?:"[^\\x17]*?"|\'[^\\x17]*?\'|\\([^\\x17)]*\\))?) *(?=$|\\x17)\\n?/m'; 16 \preg_match_all($regexp, $this->text, $matches, \PREG_OFFSET_CAPTURE | \PREG_SET_ORDER); 17 foreach ($matches as $m) 18 { 19 $this->parser->addIgnoreTag($m[0][1], \strlen($m[0][0])); 20 $id = \strtolower($m[1][0]); 21 if (!isset($this->text->linkReferences[$id])) 22 { 23 $this->text->hasReferences = \true; 24 $this->text->linkReferences[$id] = $m[2][0]; 25 } 26 } 27 } 28 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |