[Pmwiki-users] Re: Acrobatics while typing [:...:] and math markup
Patrick R. Michaud
pmichaud
Fri Oct 1 10:45:49 CDT 2004
On Fri, Oct 01, 2004 at 06:04:48PM +0200, chr at home.se wrote:
> On Fri, 1 Oct 2004, Patrick R. Michaud wrote:
>
> > Oh, I don't think that would be a problem -- we would only convert
> > (:...:) that occur in pairs on the same line. So, :) would be left
> > alone while (:directive:) would get converted.
>
> So the function that translates-on-save would only transform (: that it
> recognises as part of a directive? Don't know why, but I imagined the
> save-function to transform all '(:' to '[:' etc.
No, don't think of it in terms of '(:' and ':)', think of it as
'(:xxx:)'. Basically we only translate matching sets of (: ... :)
regardless of what occurs in-between. The PmWiki v2 code would be:
$ROSPatterns['/\\(:.*?:\\)/'] = '[:$1:]';
> But.. how would this transform function be aware of additional markup
> defined by plugins? (If it doesn't transform every occurence).
Doesn't need to -- it's looking for the (: ... :) pattern, not the
directive name.
Pm
More information about the pmwiki-users
mailing list