Browse Source
When processing list items, while changes to the list marker style are allowed for "ol" lists (ignored for "ul" lists), switching from "ol" to "ul" or vice-versa is not allowed mid-list. When a numbered/lettered marker is seen while processing a "ul" list it was simply treated as '*'. This always produced the correct result since the actual marker does not matter for "ul" lists. However, when a '*', '+', or '-' was seen while processing a "ol" list it was always treated as a '1.' marker. This is, however, incorrect if the list is not using decimal numbering. Instead treat a "ul" marker encountered during "ol" list processing as a repeat of the last marker seen. The lazy list numbering will kick in and bump it up by one while retaining the correct list marker style. The same treatment is also now given to "ol" markers encountered during "ul" list processing since it's simpler to code that way even though it doesn't make a difference in output in that case. Signed-off-by: Kyle J. McKay <mackyle@gmail.com>master
Kyle J. McKay
8 years ago
1 changed files with 14 additions and 12 deletions
Loading…
Reference in new issue