[pmwiki-users] Weird Error in Definition Markup

Kurt Devlin kurt.devlin at gmail.com
Thu Jul 13 14:45:05 CDT 2006


It definitely is. Some careful commenting in my config.php revealed that it
was some of my own custome markup that I added. Some users have been adding
a lot of "cut & pasted" email responses (including the email headers) to our
wiki pages. I added some markup so that it would take less editing to turn
the names in the header into Profiles links.

# Markup directive to handle alternate name patterns for profiles. Uses
[[~LAST, FIRST]] pattern
Markup('alternate-profile','directives','/\\[\\[~(.*?),
(.*?)\\]\\]/',"[[Profiles/$2 $1|$1, $2]]");

This made it easy to turn

    From: Devlin, Kurt
    To: Michaud, Patrick R.

into:

    From: [[~Devlin, Kurt]]
    To: [[~Michaud, Patrick]] R.

instead of rearranging the first and last names myself. For example,

    From: [[~Kurt Devlin]]
    To: [[~PatrickMichaud|Patrick R. Michaud]]

So when this pattern saw ":[[~Kurt Devlin]]:Lead for [[MyProjectA/]],
[[MyProjectB/]]", it kind of lost it's mind.

Do you have any ideas on how to tweak the pattern to save my initial concept
and prevent this side effect?

Thanks,
Kurt

On 7/13/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>
> On Thu, Jul 13, 2006 at 01:41:44PM -0400, Kurt Devlin wrote:
> >    I have the the following on one of my pages:
> >
> >        :[[~Kurt Devlin]]:Lead for [[MyProjectA/]], [[MyProjectB/]]
> >
> >    This gives me the unexpected result of:
> >
> >        Lead for MyProjectA|Kurt Devlin]]:Lead for MyProjectA, MyProjectB
> >
> >    Removing the comma after "[[MyProjectA/]]" or substituting
> "Profiles/" for
> >    the "~" gives me what I would expect:
> >
> >        Kurt Devlin
> >                Lead for MyProjectA MyProjectBThis
> >
> >    looks like some weird regular expression parsing error, but I don't
> know
> >    if it is with the PmWiki core or with any custom markup that has been
> >    added on.
>
> I don't think it's the PmWiki core, as it appear to work fine on
> pmwiki.org:
>
>     http://www.pmwiki.org/wiki/Test/Weird
>
> So, I'd look to recipes and/or local customizations as the culprit.
>
> Pm
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20060713/a40cb30a/attachment.html 


More information about the pmwiki-users mailing list