[moin-user] Bug report: two consecutive lists

Paul Boddie paul at boddie.org.uk
Mon Sep 24 17:19:02 EDT 2018


On Monday 24. September 2018 20.25.15 Volker Wysk wrote:
> 
> This snippet reproduces a MoinMoin bug:
> 
> -----snip-----
>  * a
>  * b
> 
>  1. c
>  1. d
> -----snip-----
> 
> It is rendered like this:
> 
> -----snip-----
>  • a
>  • b
> 
>  • c
>  • d
> -----snip-----
> 
> I'm using MoinMoin 1.9.9.

This seems surprising, but is partly confirmed in the syntax reference:

https://moinmo.in/HelpOnMoinWikiSyntax#Unordered_Lists

In that document, what seem like adjacent lists are actually merged:

 * item 1

 * item 2 (preceding white space)

This can be desirable because you might want to space out the items in a list 
to make the source text more readable. So, these are just two items in the 
same list with some space between them.

What you might expect, however, is that such lists with different "markers" 
would be interpreted as being distinct lists, but I guess that the parser 
doesn't agree. It would be interesting to know whether Moin 2 preserves this 
behaviour.

In my own parser for Moin syntax, I interpret blank lines between items having 
different "markers" as separating distinct lists. I won't deny that describing 
the parsing rules is a challenge, aiming to preserve reasonable existing 
behaviour whilst introducing improved new behaviour. Even describing the 
existing rules without just copying the code from Moin is awkward.

Paul


More information about the moin-user mailing list