[moin-user] Bug report: two consecutive lists

Volker Wysk post at volker-wysk.de
Mon Sep 24 17:55:33 EDT 2018


Am Montag, 24. September 2018, 23:19:02 CEST schrieb Paul Boddie:
> 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, 

Yes, that's the point.

> 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.

Yeah, that's right. Building parsers is notoriously difficult.  (But try Prolog! ;-) )

So, you agree that it's a bug, but it's hard to fix - right?

Cheers
Volker


More information about the moin-user mailing list