[Pmwiki-users] Re: [@Mono-spaced text with WikiWord@]
Ted Stern
stern+pmwiki
Thu May 6 10:06:26 CDT 2004
On 5 May 2004 at 12:14 PDT, J. Meijer wrote:
>
> 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..
Another newbie here ... I tried rearranging Preview and the edit field in my
page edit window, and I noticed that @@[= ...=]@@ text would preview correctly
but the edit field would no longer contain the original text I had entered
between that markup.
This may be related to what you see.
Consider this a vote for the permanent addition of the markup ...
>
> -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);
--
Ted Stern Applications Group
Cray Inc. office: 206-701-2182
411 First Avenue South, Suite 600 cell: 206-383-1049
Seattle, WA 98104-2860 FAX: 206-701-2500
Frango ut patefaciam -- I break that I may reveal
(The Paleontological Society motto, equally apropos for debugging)
More information about the pmwiki-users
mailing list