[Pmwiki-users] Re: [@Mono-spaced text with WikiWord@]
J. Meijer
commentgg
Wed May 5 05:54:09 CDT 2004
I shot myself in the foot with a last-minute code-change. Hope that doesn't
repeat itself here.
The lines:
$text = preg_replace("/\\[(\\=|@)(.*?)\\1\\]/se",
"'$1$1'.Keep(str_replace('\\\"','\"','$2')).'$1$1'",$text);
should read:
$text = preg_replace("/\\[(\\=|(@))(.*?)\\1\\]/se",
"'$2$2'.Keep(str_replace('\\\"','\"','$3')).'$2$2'",$text);
The error is obvious, yet the erroneous code seems to work??
As I live life off-line, I am on a daily-digest. Sorry if I'm out of sync.
jm
----- Original Message -----
From: J. Meijer
To: Pmwiki-users at pmichaud.com
Sent: Tuesday, May 04, 2004 8:28 PM
Subject: [@Mono-spaced text with WikiWord@]
I'd like to suggest the following markup as a shortcut for @@[= ... =]@@
[@Mono-spaced text with WikiWords@]
I think the combination occurs frequently, partly because I tend to use it
instead of just @@...@@.
I implemented the syntax with a minimal patch of the PrintText() function:
...
$text = htmlspecialchars($text,ENT_NOQUOTES);
#start of modification
$text = preg_replace("/\\[(\\=|@)(.*?)\\1\\]/se",
"'$1$1'.Keep(str_replace('\\\"','\"','$2')).'$1$1'",$text);
#original code:
# $text = preg_replace("/\\[\\=(.*?)\\=\\]/se",
# "Keep(str_replace('\\\"','\"','$1'))",$text);
...
jm
More information about the pmwiki-users
mailing list