From 4a67f3a2a1e3d94ce1213f43d1fd287048abe0a8 Mon Sep 17 00:00:00 2001 From: vargenau Date: Sun, 3 Aug 2008 16:03:47 +0000 Subject: [PATCH] Implement Wikicreole syntax for links git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@6123 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/InlineParser.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/InlineParser.php b/lib/InlineParser.php index 83fba8741..0a71741f7 100644 --- a/lib/InlineParser.php +++ b/lib/InlineParser.php @@ -1,5 +1,5 @@ * Copyright (C) 2004-2008 Reini Urban * Copyright (C) 2008 Marc-Etienne Vargenau @@ -328,6 +328,14 @@ function LinkBracketLink($bracketlink) { // $bracketlink will start and end with brackets; in between will // be either a page name, a URL or both separated by a pipe. + $wikicreolesyntax = false; + + if (string_starts_with($bracketlink, "[[")) { + $wikicreolesyntax = true; + $bracketlink = str_replace("[[", "[", $bracketlink); + $bracketlink = str_replace("]]", "]", $bracketlink); + } + // Strip brackets and leading space // bug#1904088 Some brackets links on 2 lines cause the parser to crash preg_match('/(\#?) \[\s* (?: (.*?) \s* (?