Open SebCorbin opened 3 years ago
This bug is still present – numbered lists don't respect the wrap_list_items and body_width settings. Note that unordered lists are wrapped correctly, only ordered ones stay unwrapped. Looking at skipwrap()
, it seems it has two parts where it tries to react to lists, one as shown in the description where it uses the RE_ORDERED_LIST_MATCHER
and RE_UNORDERED_LIST_MATCHER
regexes, but there is also another part before that where it matches on literal list item characters:
# I'm not sure what this is for; I thought it was to detect lists,
# but there's a <br>-inside-<span> case in one of the tests that
# also depends upon it.
if stripped[0:1] in ("-", "*") and not stripped[0:2] == "**":
return not wrap_list_items
I would assume this is why it works correctly for unordered lists.
So @SebCorbin's fix looks like it should do the trick.
Should normally render
But instead it return unwrapped text
I suggest changing
skipwrap()
end of function to: