-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc/rst2html: some few fixes for enumerated and bullet lists #16295
Conversation
|
* fix parse failure when next line after list empty * implement arbitrary start of enumerator * check that enumerators are in order
555af98
to
b73cd7e
Compare
@narimiran please review. |
Looks good! Since we also support markdown, the following is a valid ordered list:
(The behaviour is the same as in your Could you add support for that too? |
Can be done in a followup PR, I'm merging this now. |
…g#16295) * fix bullet/enumarated lists with many blank lines * fix enumerated list parsing * fix parse failure when next line after list empty * implement arbitrary start of enumerator * check that enumerators are in order * remove redundant start=x if x=1 or a * add some doc on implemented features * update start in rst_examples.rst * allow upper-case letters + more docs
…g#16295) * fix bullet/enumarated lists with many blank lines * fix enumerated list parsing * fix parse failure when next line after list empty * implement arbitrary start of enumerator * check that enumerators are in order * remove redundant start=x if x=1 or a * add some doc on implemented features * update start in rst_examples.rst * allow upper-case letters + more docs
First of all, fix #16041 : enumerated lists parsing is re-implemented — now there is no requirement, that it should contain some line after enumerator line, and it does not produce spurious block quotes as in #16041 . Also
(1)
and(2)
were not parsed as enumerated list innimdoc/rst2html/expected/rst_examples.html
, most probably it was the same problem.Also now rst.nim correctly handles alphabetic characters as enumerators:
while previously it turned them into
1. string1 2. string2
.According to the spec rst.nim checks that
It can now generate auto-enumerator properly:
The first commit addresses a few blank lines problem for enumerated and bullet lists:
was not parsed as a single list, while Multiple successive blank lines are equivalent to a single blank line
cc @narimiran