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

chr@home.se chr
Thu Jan 20 08:54:02 CST 2005


On Thu, 20 Jan 2005, Neil Herber wrote:

> At 2005-01-20  04:01 PM +0100, chr at home.se is rumored to have said:
> >What I would like is to be able to write the following:
> >
> >         * short item
> >         * longer item
> >         * this is an incredibly long item
> >           that will end up occupying several
> >           lines.
> >
> >where you should note the extra two spaces before "that will end...".
> >Hopefully PmWiki could recognize that the line before "  that will..." is
> >an item, with it's item text starting at column 2 in this case, and then
> >recognize that the next line starts with 2 spaces and therefore actually
> >belongs to the same item.
> 
> I think this could be "cured" by having PmWiki *not* emit the </ul> tag 
> until it encounters a blank line after a list.  I am surprised that this is 
> not the default - there must be a good reason!

Well, if PmWiki only looked for a blank line you couldn't use this 
markup:

	* short item
	A paragraph with text...
	* short item
		if(i > 0) i++;   // A line of C-code in code markup
	* another item

Right now the result renders differently if you have a blank line or 
not... i.e.

	* short item
	A paragraph with text

is rendered differently from

	* short item

	A paragraph with text


Btw, I should mention a drawback with using the indentation style I 
suggested.  If you first write something like this:

	* An item
	* Another item with a long text
	  that continues on another line

and then decides that the second item needs to be a second level item, you 
might end up with:

	* An item
	** Another item with a long text
	  that continues on another line

Note that there is only two spaces in "  that continues...", which means 
that it isn't aligned with "Another..." and therefore wouldn't be 
interpreted as a continuation of the item. In my mind this is not such a 
big deal though...  (see the post I'm just going to write though about 
'Problem with code markup')

/Christian

-- 
Christian Ridderstr?m, +46-8-768 39 44               http://www.md.kth.se/~chr




More information about the pmwiki-users mailing list