[Pmwiki-users] [@Mono-spaced text with WikiWord@]
Patrick R. Michaud
pmichaud
Tue May 4 23:16:02 CDT 2004
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",
> "'$1$1'.Keep(str_replace('\\\"','\"','$2')).'$1$1'",$text);
I don't think this can work properly, because if I read this
correctly then [=text=] becomes ==text== on output? Am I missing
something?
Pm
More information about the pmwiki-users
mailing list