[Moin-user] Nesting wiki syntax and delimiters

Christopher MacMinn cmac at mit.edu
Sun Apr 5 12:29:24 EDT 2009


Hi again, everyone -

This is a long one, so sorry about that.  I'm having a few problems with
basic wiki syntax, all loosely related to slightly more advanced use.
 Thoughts, opinions, corrections, etc. are all welcome.


First:  end-of-line and blank lines.

The wiki parser appears to insert multiple meaningless <span> and <p>
elements into the HTML output -- they have ids like "line-1" and "line867".
 This leads to ugly HTML for what should be a very simple page, and I think
it comes from how blank lines are handled.  I would suggest that at the very
least, these should not have ids -- certainly, it would not be advisable to
try to style them since they are not user-generated, so I think the ids just
clutter the output.

Also on this topic, some things do not work as expected -- the syntax
instructions state that a definition list with multiple definitions for a
single term should be constructed like this:

 Term::
 :: definition 1
 :: definition 2
 :: definition 3

And this pretends to produce the desired output, but in fact the three <dd>
elements are not associated with the correct <dt> element at all -- each
<dd> is handled as a separate definition for a term with a blank <dt>.
 Semantically, this is bad... and it could also lead to CSS problems.


Second:  nesting wiki syntax.

It appears that many types of wiki syntax don't nest.  For example, consider
the following:

=== [[userpage|User's Name]] ===

 * [[userpage|User's Name]]
 * blah blah

 [[userpage|User's Name]]::
 :: blah blah

Only the middle of these three works as expected -- the other two don't
parse the link.  It also doesn't work to nest a definition list within an
unordered list, or vice-versa:

 * Term 1::
   :: definition
 * Term 2:: definition

 Term 1::
 :: * Item 1
    * Item 2
    * Item 3
 Term 3::
 :: definition

I realize that these may be slightly tricky to parse correctly, but they are
trivial to construct with HTML.  Which brings me to my next point...


Third:  delimiters for wiki syntax

Is there a way to manually delimit the beginning and end of a wiki element?
 For example,

 * {  Term 1::
      :: definition 1
      :: definition 2
      :: definition 3 }
 * item 2

This way, everything between the curly brackets would be shoved inside the
first <li> element of the <ul>.  I think the structural clarity this would
bring is well worth the trade-off of bracket-clutter.


Thanks!

Best, Chris MacMinn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/moin-user/attachments/20090405/b324e5d8/attachment.html>


More information about the Moin-user mailing list