From f3ede125f262d319d626961190c749f7c439400d Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 1 Feb 2024 12:48:50 +0200 Subject: [PATCH] improve wp, doku, indexmenu rules --- src/Dokuwiki/Reader.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Dokuwiki/Reader.php b/src/Dokuwiki/Reader.php index b25f34b..4906a7f 100644 --- a/src/Dokuwiki/Reader.php +++ b/src/Dokuwiki/Reader.php @@ -40,14 +40,17 @@ class Reader '/\{\{\s?([^\}]+)\s?\}\}/' => '{{$1}}', /// Wikipedia - '/\[\[wp([A-z]{2,})>([^\|]+)\|([^\]]+)\]\]/i' => '$3 ( https://$1.wikipedia.org/wiki/$2 )', + '/\[\[wp([A-z]{2,})>([^\|]+)\|([^\]]+)\]\]/ui' => '$3 ( https://$1.wikipedia.org/wiki/$2 )', '/\[\[wp>([^\|]+)\|([^\]]+)\]\]/i' => '$2 ( https://en.wikipedia.org/wiki/$1 )', + '/\[\[wp([A-z]{2,})>([^\]]+)\]\]/i' => '$2 ( https://$1.wikipedia.org/wiki/$2 )', + '/\[\[wp>([^\]]+)\]\]/i' => '$1 ( https://en.wikipedia.org/wiki/$1 )', /// Dokuwiki '/\[\[doku>([^\|]+)\|([^\]]+)\]\]/i' => '$2( https://www.dokuwiki.org/$1 )', + '/\[\[doku>([^\]]+)\]\]/i' => '$1( https://www.dokuwiki.org/$1 )', /// Index - '/\{\{indexmenu>:([^\}]+)\}\}/i' => '$1', // @TODO + '/\{\{indexmenu>:([^\}]+)\}\}/i' => '', // @TODO '/\{\{indexmenu_n>[\d]+\}\}/i' => '', // @TODO // Related