xref: /dokuwiki/inc/Parsing/ParserMode/Multiplyentity.php (revision d4f83172d9533c4d84f450fe22ef630816b21d75)
1*be906b56SAndreas Gohr<?php
2*be906b56SAndreas Gohr
3*be906b56SAndreas Gohrnamespace dokuwiki\Parsing\ParserMode;
4*be906b56SAndreas Gohr
5*be906b56SAndreas Gohr/**
6*be906b56SAndreas Gohr * Implements the 640x480 replacement
7*be906b56SAndreas Gohr */
8*be906b56SAndreas Gohrclass Multiplyentity extends AbstractMode
9*be906b56SAndreas Gohr{
10*be906b56SAndreas Gohr    /** @inheritdoc */
11*be906b56SAndreas Gohr    public function connectTo($mode)
12*be906b56SAndreas Gohr    {
13*be906b56SAndreas Gohr
14*be906b56SAndreas Gohr        $this->Lexer->addSpecialPattern(
15*be906b56SAndreas Gohr            '(?<=\b)(?:[1-9]|\d{2,})[xX]\d+(?=\b)',
16*be906b56SAndreas Gohr            $mode,
17*be906b56SAndreas Gohr            'multiplyentity'
18*be906b56SAndreas Gohr        );
19*be906b56SAndreas Gohr    }
20*be906b56SAndreas Gohr
21*be906b56SAndreas Gohr    /** @inheritdoc */
22*be906b56SAndreas Gohr    public function getSort()
23*be906b56SAndreas Gohr    {
24*be906b56SAndreas Gohr        return 270;
25*be906b56SAndreas Gohr    }
26*be906b56SAndreas Gohr}
27