4be41e3bb5
This adds support for counter cookies in org lists. Such cookies are used to override the item counter in ordered lists. In org it is possible to set the counter at any list item, but since Pandoc AST does not support this, we restrict the usage to setting an offset for the entire ordered list, by using the cookie in the first list item. Note that even though unordered lists do not have counters, Org Mode still parses such cookies in unordered lists and suppresses them in the output, so we do the same. Also, even though org-list-allow-alphabetical is disabled in Emacs by default, for some reason alphabetical cookies are always parsed and used in Org Mode regardlessly of whether this option is enabled or the list style is decimal, so we do the same. E.g. 2. test 3. test Is parsed as an ordered list starting at 1, as before. This also conforms to Org Mode behaviour. 1. [@2] test 2. test Is now parsed as an ordered list starting at 2, so that it conforms to Org Mode behaviour. Note that when parsing 1. [@2] test 2. [@9] test the second cookie is silenced and the entire list starts at 2. This is because the current Pandoc AST does not support expressing a change in the counter at a specific item. |
||
---|---|---|
.. | ||
Pandoc | ||
Pandoc.hs |