xref: /dokuwiki/inc/Parsing/ParserMode/Windowssharelink.php (revision be906b566b9bdfd92c032ee07c4fd077d820a8d1)
1*be906b56SAndreas Gohr<?php
2*be906b56SAndreas Gohr
3*be906b56SAndreas Gohrnamespace dokuwiki\Parsing\ParserMode;
4*be906b56SAndreas Gohr
5*be906b56SAndreas Gohrclass Windowssharelink extends AbstractMode
6*be906b56SAndreas Gohr{
7*be906b56SAndreas Gohr
8*be906b56SAndreas Gohr    protected $pattern;
9*be906b56SAndreas Gohr
10*be906b56SAndreas Gohr    /** @inheritdoc */
11*be906b56SAndreas Gohr    public function preConnect()
12*be906b56SAndreas Gohr    {
13*be906b56SAndreas Gohr        $this->pattern = "\\\\\\\\\w+?(?:\\\\[\w\-$]+)+";
14*be906b56SAndreas Gohr    }
15*be906b56SAndreas Gohr
16*be906b56SAndreas Gohr    /** @inheritdoc */
17*be906b56SAndreas Gohr    public function connectTo($mode)
18*be906b56SAndreas Gohr    {
19*be906b56SAndreas Gohr        $this->Lexer->addSpecialPattern(
20*be906b56SAndreas Gohr            $this->pattern,
21*be906b56SAndreas Gohr            $mode,
22*be906b56SAndreas Gohr            'windowssharelink'
23*be906b56SAndreas Gohr        );
24*be906b56SAndreas Gohr    }
25*be906b56SAndreas Gohr
26*be906b56SAndreas Gohr    /** @inheritdoc */
27*be906b56SAndreas Gohr    public function getSort()
28*be906b56SAndreas Gohr    {
29*be906b56SAndreas Gohr        return 350;
30*be906b56SAndreas Gohr    }
31*be906b56SAndreas Gohr}
32