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

refactor: replace archived m2r with updated mistune #3506

Merged
merged 21 commits into from
Jul 27, 2024

Conversation

dangotbanned
Copy link
Member

@dangotbanned dangotbanned commented Jul 27, 2024

The dev dependency m2r was archived on 2022-11-17.
The most popular fork m2r2 was last updated on 2023-01-30.

m2r was used to convert markdown to rst, extending https://github.com/lepture/mistune/releases/tag/v0.8.4

This functionality is part of the current version of mistune

mistune==0.8.4 currently raises the following error during doc:built-html:

Run hatch run doc:build-html
Creating environment: doc
Installing project in development mode
Checking dependencies
cmd [1] | mkdir -p doc/_images
cmd [2] | sphinx-build -b html -d doc/_build/doctrees doc doc/_build/html
Running Sphinx v7.4.7
loading translations [en]... done
/home/runner/.local/share/hatch/env/virtual/altair/801ceKDt/doc/lib/python3.12/site-packages/mistune.py:435: SyntaxWarning: invalid escape sequence '\|'
  cells[i][c] = re.sub('\\\\\|', '|', cell)
making output directory... done

Changes

Most of the diff is due to m2r inserting whitespace where it wasn't needed.

As a bonus, some bulleted lists that appear within a parameter description are now formatted correctly.

Before -> After

@dangotbanned dangotbanned marked this pull request as ready for review July 27, 2024 17:32
@mattijn
Copy link
Contributor

mattijn commented Jul 27, 2024

Thanks! Really nice to read through the commits one by one to follow the proces. And I like the bonus too!

@mattijn mattijn merged commit 1939ebd into vega:main Jul 27, 2024
17 checks passed
@dangotbanned
Copy link
Member Author

dangotbanned commented Jul 27, 2024

Thanks! Really nice to read through the commits one by one to follow the proces. And I like the bonus too!

Thanks @mattijn

It was an interesting journey to get there, but surprisingly few changes (in tools/) at the end of all the commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants