From d788879db27c9acef001d4b68b6e7f10e5304ac2 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 28 Mar 2001 21:30:48 +0000 Subject: - update the linking mechanism: to link to a "node" (ex story) with title "fubar", use [[fubar]] or [[fubar|link text]]. --- includes/function.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/function.inc') diff --git a/includes/function.inc b/includes/function.inc index ddd113844..eb1a08b3c 100644 --- a/includes/function.inc +++ b/includes/function.inc @@ -102,9 +102,9 @@ function format_tag($link, $text) { function format_text($text) { $src = array( // "/(<\/?)(\w+)([^>]*>)/e", // convert HTML to lower case - "/\[(([^\|]*?)(\|([^\|]*?))?)\]/e"); // [link|description] + "/\[\[(([^\|]*?)(\|([^\|]*?))?)\]\]/e"); // [link|description] $dst = array( // "'\\1'. strtolower('\\2') .'\\3'", // convert HTML to lower case - format_tag('\\2', '\\4')); // [link|description] + format_tag('\\2', '\\4')); // [link|description] return preg_replace($src, $dst, $text); } -- cgit v1.2.3