aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/Parsing/ParserMode/Filelink.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2023-09-02 14:42:51 +0200
committerGitHub <noreply@github.com>2023-09-02 14:42:51 +0200
commit5ff5424d8c81c7123d8656a787af2ff85b3dec21 (patch)
tree322929ee01d892bb3c927e7fe1238369c647f820 /inc/Parsing/ParserMode/Filelink.php
parent0613df3287b82a98b1e97cf86ed9d4c8fbd16f1c (diff)
parent91560755291852b8302767d454183a7662666f7e (diff)
downloaddokuwiki-5ff5424d8c81c7123d8656a787af2ff85b3dec21.tar.gz
dokuwiki-5ff5424d8c81c7123d8656a787af2ff85b3dec21.zip
Merge pull request #4045 from dokuwiki/autofix
Use Rector to autofix code smell
Diffstat (limited to 'inc/Parsing/ParserMode/Filelink.php')
-rw-r--r--inc/Parsing/ParserMode/Filelink.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/inc/Parsing/ParserMode/Filelink.php b/inc/Parsing/ParserMode/Filelink.php
index 3cd86cb8b..3e57af32f 100644
--- a/inc/Parsing/ParserMode/Filelink.php
+++ b/inc/Parsing/ParserMode/Filelink.php
@@ -4,7 +4,6 @@ namespace dokuwiki\Parsing\ParserMode;
class Filelink extends AbstractMode
{
-
protected $pattern;
/** @inheritdoc */
@@ -14,11 +13,10 @@ class Filelink extends AbstractMode
$ltrs = '\w';
$gunk = '/\#~:.?+=&%@!\-';
$punc = '.:?\-;,';
- $host = $ltrs.$punc;
- $any = $ltrs.$gunk.$punc;
+ $any = $ltrs . $gunk . $punc;
- $this->pattern = '\b(?i)file(?-i)://['.$any.']+?['.
- $punc.']*[^'.$any.']';
+ $this->pattern = '\b(?i)file(?-i)://[' . $any . ']+?[' .
+ $punc . ']*[^' . $any . ']';
}
/** @inheritdoc */