summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-16 15:29:16 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-16 15:29:16 +0100
commit8934c41e1a3d8c51666a9417a40fec4c4187c0a5 (patch)
tree3be69eeb22b70cf53d004f489dd04418cbbf188d
parent0aa2d07cab08bc3ec33f3ff227dae5fc525d68d9 (diff)
downloadliberty-8934c41e1a3d8c51666a9417a40fec4c4187c0a5.tar.gz
liberty-8934c41e1a3d8c51666a9417a40fec4c4187c0a5.tar.bz2
liberty-8934c41e1a3d8c51666a9417a40fec4c4187c0a5.zip
Fix bug in replacing (()) entires after page title change
-rwxr-xr-xplugins/filter.bitlinks.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/filter.bitlinks.php b/plugins/filter.bitlinks.php
index 593453b..5c0ce9b 100755
--- a/plugins/filter.bitlinks.php
+++ b/plugins/filter.bitlinks.php
@@ -578,16 +578,16 @@ class BitLinks extends BitBase {
// \| # the seperating deliminator
// ([^\)]*) # get as many characters as possible up to the next ) - put this in $1
// \)[2] # closing brackets ))
- $pattern[] = "!\([2]\b$pOldName\b\|([^\)]*)\)[2]!";
+ $pattern[] = "!\({2}\b$pOldName\b\|([^\)]*)\){2}!";
// - replace with new name leaving description in tact
$replace[] = "(($pNewName|$1))";
// --- ((Wiki Page)) or WikiPage
- // (\([2])? # check for (( - optional - put this in $1
+ // (\({2})? # check for (( - optional - put this in $1
// \b$pOldName\b # make sure the old name is on it's own
- // (\)[2])? # closing brackets )) - optional - put this in $2
- $pattern[] = "!(\([2])?\b$pOldName\b(\)[2])?!";
+ // (\){2})? # closing brackets )) - optional - put this in $2
+ $pattern[] = "!(\({2})?\b$pOldName\b(\){2})?!";
// - the replacement depends on the new name
$replace[] = preg_match( "! !", $pNewName )