Skip to content
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

🐛 FIX: Ordered list starting number #483

Merged
merged 2 commits into from
Dec 31, 2021
Merged

Conversation

chrisjsewell
Copy link
Member

Propagate the starting number of ordered lists to the docutils AST.

fixes #482

Equivalency with RST can now be seen with:

test.txt:

5. foo
6. bar
$ rst2pseudoxml.py test.txt
<document source="test.txt">
    <enumerated_list enumtype="arabic" prefix="" start="5" suffix=".">
        <list_item>
            <paragraph>
                foo
        <list_item>
            <paragraph>
                bar
$ myst-docutils-pseudoxml test.txt
<document source="test.txt">
    <enumerated_list enumtype="arabic" prefix="" start="5" suffix=".">
        <list_item>
            <paragraph>
                foo
        <list_item>
            <paragraph>
                bar

Propagate the starting number of ordered lists to the docutils AST.

fixes #482
@codecov
Copy link

codecov bot commented Dec 31, 2021

Codecov Report

Merging #483 (3a2502f) into master (60e3601) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #483   +/-   ##
=======================================
  Coverage   90.03%   90.03%           
=======================================
  Files          16       16           
  Lines        2057     2057           
=======================================
  Hits         1852     1852           
  Misses        205      205           
Flag Coverage Δ
pytests 90.03% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
myst_parser/docutils_renderer.py 92.15% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 60e3601...3a2502f. Read the comment docs.

@chrisjsewell chrisjsewell merged commit feff225 into master Dec 31, 2021
@chrisjsewell chrisjsewell deleted the fix-list-number branch December 31, 2021 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ordered lists do not respect the start number
1 participant