[Pmwiki-users] [@Mono-spaced text with WikiWord@]
J. Meijer
commentgg
Wed May 5 18:47:53 CDT 2004
I tried the DoubleBrackets-syntax alternatives below. Unfortunately they do
not *always* result in exactly the same result as @@[=monospaced text with
WikiWords=]@@.
I have other DoubleBrackets-syntax defined and it gets applied before the [=
. =] effect. Changing the order in local/config.php apparently didn't help.
Perhaps this is the motive for the special treatment of the [=..=] syntax in
PrintText?
Newbie..
-jm
----- Original Message -----
From: Patrick R. Michaud
Sent: Wednesday, May 05, 2004 6:15 AM
Subject: Re: [Pmwiki-users] [@Mono-spaced text with WikiWord@]
On Tue, May 04, 2004 at 08:28:40PM +0100, J. Meijer wrote:
> I'd like to suggest the following markup as a shortcut for @@[= ... =]@@
>
> [@Mono-spaced text with WikiWords@]
I've often thought that this would be a useful markup as well.
Rather than patching pmwiki.php it can be done with a DoubleBrackets
entry in config.php:
$DoubleBrackets['/\\[@(.*?)@\\]/se'] =
"'@@'.Keep(str_replace('\\\"','\"','$1')).'@@'";
or possibly
$DoubleBrackets['/\\[@(.*?)@\\]/se'] =
"'<code>'.Keep(str_replace('\\\"','\"','$1')).'</code>'";
Anyone who would like to see this as a permanent addition to PmWiki,
send me an email vote. Even better, cast a vote for it on
http://www.pmichaud.com/wiki/Development/ExtendedMarkup
> I implemented the syntax with a minimal patch of the PrintText()
function:
> ...
> $text = preg_replace("/\\[(\\=|(@))(.*?)\\1\\]/se",
> "'$2$2'.Keep(str_replace('\\\"','\"','$3')).'$2$2'",$text);
More information about the pmwiki-users
mailing list