Subject: | list end not recognized |
Date: | Mon, 23 May 2016 21:33:55 +0200 |
To: | bug-Org-Parser [...] rt.cpan.org |
From: | Christian Garbs <mitch [...] cgarbs.de> |
Hi there!
Great module, I'm using it as a converter from Orgmode to HTML for my
blog with some handcrafted features.
I'm using Org-Parse version 0.47 and it looks like the end of a list
is not always detected correctly. Given this input file
- - - - 8< - - - -
* broken test case
- some things
- that start well
- don't end well
like here when this paragraph outside the list
gets parsed as part of the last list item
- - - - >8 - - - -
the last paragraph gets parsed as part of the list while it should be
a separate paragraph on the same level as the whole list (another
child of the heading).
dump-org-structure shows this
Document:
Headline: l=1
(title)
Text: "broken test case"
(children)
Text: "\n"
List: U(-) indent=0
ListItem: -
(children)
Text: "some things\n"
ListItem: -
(children)
Text: "that start well\n"
ListItem: -
(children)
Text: "don't end well\n\nlike here when this paragraph o..."
while I would expect something like this instead:
Document:
Headline: l=1
(title)
Text: "broken test case"
(children)
Text: "\n"
List: U(-) indent=0
ListItem: -
(children)
Text: "some things\n"
ListItem: -
(children)
Text: "that start well\n"
ListItem: -
(children)
Text: "don't end well\n"
Text: "\nlike here when this paragraph o..."
The org manual chapter "2.7 Plain lists" states:
| A list ends whenever every item has ended, which means before any
| line less or equally indented than items at top level. It also ends
| before two blank lines[5]. In that case, all items are closed.
I don't know how hard the end-of-list detection is to implement, but
I'd already be very happy with the "two blank lines" variant.
Regards
Christian
--
....Christian.Garbs....................................https://www.cgarbs.de
Knäckebrot krümelt nicht mehr, wenn man es kurz vor dem Verzehr in
eine Schale lauwarmes Wasser legt!