fletcher / peg-multimarkdown

An implementation of MultiMarkdown in C, using a PEG grammar - a fork of jgm's peg-markdown. No longer under active development - see MMD 5.
Other
523 stars 55 forks source link

Nested Lists when converting to FODF #72

Closed teoric closed 13 years ago

teoric commented 13 years ago

I often use use hierarchical lists with markdown. But when converting to ODT, the XML tags for the lists are improperly nested, and hence the file cannot be opened in Libre/NeoOffice.

Test Case

- first level 1
    - second level a
    - second level b
- first level 2
    - second level a
    - second level b
- first level 3
fletcher commented 13 years ago

Lists are tricky when creating ODF documents, because the way they are handled involves a different nesting strategy than HTML.

But if you include blank lines between the list items, thereby forcing them into "paragraph" mode, it works.

fletcher commented 13 years ago

You can experiment, but it might be that you only need an empty line after the parent item in the list.

I'll try and find another way to fix this more definitively.

fletcher commented 13 years ago

I think I found a relatively easy way to fix this. I ran a few tests,and it seems to work. The fix is in the latest development and glibfree commits, if anyone wants to try it out. It will be included in the next binary release.

teoric commented 13 years ago

Looks very good to me, thank you very much!