Markus Krötzsch skrev:
> The default pattern now is
>
> It covers anything but syntax with [ and ] in property values. The 
> alternative 
> (optional) pattern is
>
> /\[\[                 # Beginning of the link
> (?:([^:][^]]*):[=:])+ # Property name (or a list of those)
> (                     # After that:
>   (?:[^|\[\]]         #   either normal text (without |, [ or ])
>   |\[\[[^]]*\]\]      #   or a [[link]]
>   |\[[^]]*\]          #   or an [external link]
> )*)                   # all this zero or more times

Except for starting up the '[[Property::' (and closing it with ']]') it 
doesn't seem to be very important at all what's in the 
'::<value>]]'-part, except for making sure that brackets (if any) are in 
balance.

> (?:\|([^]]*))?        # Display text (like "text" in [[link|text]]), optional
> \]\]                  # End of link
> /xu
>
> It covers nested [[...]] and [...], and has special treatment for the final | 
> (to distinguish it from | in nested links).

Ok, one must keep track of which bracket pair is "owning" a pipe, but 
that's not too hard. But what would happen if allowing for nested SMW 
properties? (a SMW property inside another SMW property, which sometimes 
would be useful). Example:

  [[Summary::Article summaries would benefit from having nested
  [[has nested::SMW property|SMW properties]]]] in it's summary
  part, apart from regular [[wiki link]]s.]]

If this could be allowed, one could allow for a nesting depth of, say, 
one level. Or, would a nested SMW property eventually choke the 
internals of SMW? :)

Regards,

// Rolf Lampa


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to