executablebooks / rst-to-myst

Convert ReStructuredText to MyST Markdown
https://rst-to-myst.readthedocs.io
MIT License
64 stars 11 forks source link

πŸ‘Œ IMPROVE: dollarmath with argument #22

Closed jedbrown closed 3 years ago

jedbrown commented 3 years ago

The formatting in case both argument and body is present is intended to be consistent with:

https://github.com/sphinx-doc/sphinx/blob/eda4b1cfc49cddfeb8d9ce3b0c495ebebb01fb6c/sphinx/directives/patches.py#L196-L198

This implements the fix suggested in https://github.com/executablebooks/rst-to-myst/issues/13#issuecomment-868894833

welcome[bot] commented 3 years ago

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.
Welcome to the EBP community! :tada:

jedbrown commented 3 years ago

With this change, I'm cleanly handling everything except dropdown (fixed in #23) and list-table directives (which currently use eval-rst; I haven't tested with parse_all works out of the box despite converting * to -).

codecov[bot] commented 3 years ago

Codecov Report

Merging #22 (db61067) into main (7a6cbac) will increase coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
+ Coverage   84.29%   84.33%   +0.03%     
==========================================
  Files          10       10              
  Lines        1617     1621       +4     
==========================================
+ Hits         1363     1367       +4     
  Misses        254      254              
Flag Coverage Ξ”
pytests 84.33% <100.00%> (+0.03%) :arrow_up:

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

Impacted Files Coverage Ξ”
rst_to_myst/markdownit.py 91.79% <100.00%> (+0.08%) :arrow_up:

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 7a6cbac...db61067. Read the comment docs.