[Pmwiki-users] Idea for extension of special list syntax

Patrick R. Michaud pmichaud
Fri Jan 21 07:40:42 CST 2005


On Fri, Jan 21, 2005 at 07:32:27AM -0500, Neil Herber wrote:
> 
> Going back to a question I had earlier, can this not be solved by having 
> the list markup look for a trailing blank line before finishing the list? 
> It does that for paragraphs ...
> 
> I think you had an example of why that would not work. Perhaps you should 
> add it to the page.

Well, it looks as though I'm only going to receive 40% of the messages
in this thread, so I'll reply as best I can via the archives... :-(

Trailing blank lines don't "finish" the list (or other block markups)
because some people want vertical blank space in the middle of the list.
(And using \\ is actually a bad idea here, for a different set of reasons.)

For example, in the markup

    # Item 1
    ## This is item 1.1.  It's got some text with it.
    ## This is item 1.2.  It's got some text with it too.

    # Item 2
    ## This is item 2.1.  Even more text.
    ## This is item 2.2.  Still more text

    # Item 3
    ## etc.

the blank lines don't terminate the list -- they provide spacing between
items.  What terminates a list (or preformatted text section, or ...) 
is the fact that the next non-blank line doesn't contain a list markup 
at the same or increased level.

Finally, as Christian notes (in a message I haven't received yet and
thus cannot reply to directly), fixing subsequent lines to be part of
the current list item really doesn't go quite far enough.  In addition
to being able to continue the text of a list item, authors would also
like to be able to embed paragraphs, and even preformatted text, within 
list items.  So, I'd prefer to explore solutions that enable this
capability as well, rather than stop short with just the continue
the current paragraph within a list item.

There's an issue with using leading space for continuation in that it
can make for some really ambiguous nesting.  Consider:

   * list item 1
     continued list item 1
   ** list item 2
      continued list item 2
     Is this part of 1, 2, or is it preformatted text?
   **list item 3
     How about this?  If this is part of 3, why wasn't the line above
     part of 2, as they're both indented by two spaces.

     And this one?
    Or this one?
         Or this?

There doesn't seem to be an "obvious" interpretation, or, in other
words, no matter what we decide, there's likely to be a signficant
population of authors who will end up being very confused by it or
strongly feel it should work differently.

Some wikis use a different approach altogether, saying that "leading
spaces + block markup produce current ident level", as in:

    * list item 1
      continued list item 1
      * list item 2
        continued list item 2
      * list item 3
        continued list item 3
       still list item 3
      continuation of list item 1
       still list item 1
     even more list item 1
    Normal paragraph text

I'm not a big fan of this markup, because it requires knowing that
list levels are controlled by multiples-of-two spaces.  Plus it seems
to go against current trends in wiki markup.

Prior to this discussion I had been playing with the idea of a
"remain within current item" markup to allow paragraphs and
preformatted text to nest inside of lists.  I hadn't come up
with a good markup for it yet, so just pretend that it's leading
carets:

    * list item 1 that has a lot of text all on one line

    ** this is a sublist item

    ^^ This is text that continues at the sublist level

    ^ This is text that continues as part of the level 1 list item 1

    ^ still in list item 1

    Normal paragraph text

This still doesn't solve Christian's desire to be able to automatically
join broken lines into list items, though.  

To brainstorm a bit, how about some sort of modifier that can be
placed on the list markers... ?

    *> This is list item 1.  The '>' after the
       bullet indicates that any indented lines that follow are
       to be continuations of the current list item.

       This paragraph, being indented, is still part of the
       list item above.

    *> Here's another list item.  Any indented lines that
       follow this are also continuations.

    Now we're back to normal text.

I'm also thinking that perhaps we should come up with some sort of markup
that can clearly delineate code blocks.  The "space and [= at beginning
of a line" solution is elegant and consistent, but too many authors
seem to miss it entirely.  

I think it's extremely unlikely that I will want to totally eliminate the
"leading spaces produces monospaced text" rule, as that's a fairly common
theme among a variety of text formatters, including wikis.  This doesn't
mean that leading space in every circumstance has to produce monospace
text, it just means that any proposals that can't accommodate it
somehow would have to have some very compelling arguments for it.

Pm



More information about the pmwiki-users mailing list