[pmwiki-users] spaces after list markup

Patrick R. Michaud pmichaud at pobox.com
Mon Feb 28 16:57:16 CST 2005


I'm considering a (hopefully VERY MINOR) change to PmWiki's
list markup and the way it handles spaces after the list markers, but 
I want to check with this group before making the change.  If you
read this and have no clue what I'm talking about, you can probably
safely ignore this message. :-)

Currently PmWiki honors spaces after list markup, such that

    *      Item 1
    *Item 2
    *  Item 3

generates the following HTML output:

    <ul><li>      Item 1
    </li><li>Item 2
    </li><li>  Item 3
    </li></ul>

As you can see, PmWiki preserves the leading spaces in each list
item.  However, depending on the stylesheet settings some browsers 
will render those leading spaces slightly differently, affecting 
alignment, coloring, and padding of the list items.

My proposal is to change the list markup so that any spaces
between the list markup and the first character of the item
are silently stripped, so that the markup above would output:

    <ul><li>Item 1
    </li><li>Item 2
    </li><li>Item 3
    </li></ul>

Similar changes would be made for the #, ->, and -< markups.
Any objections?

My reason for wanting to change this is that I feel that
authors shouldn't have to make a distinction between the 
following just to get things to align properly (I tend
to write in the style of the left-hand list):

    * Item 1                         *Item 1
    * Item 2                         *Item 2
    * Item 3                         *Item 3

However, if anyone *really* cares about having those spaces
render after the <li> tag, it would be sufficient for my
purposes to simply strip one space character following the
list marker, thus one could do

    *  Item 1
    *  Item 2
    *  Item 3

with two spaces after the marker if the whitespace is truly
needed/significant.

Comments, suggestions, objections welcome.

Pm



More information about the pmwiki-users mailing list