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

remove mistune approximate pin, add 3.0 compatibility, add 3.0 lower pin #68

Merged
merged 2 commits into from
Jul 5, 2023

Conversation

braingram
Copy link
Contributor

@braingram braingram commented Jun 26, 2023

The tests and the CI don't do a great job of testing these changes.

The use of mistune in sphinx-asdf is to convert markdown embedded in the ASDF schemas to rst for rendering in sphinx. This was previously handled with a custom rst renderer registered with mistune (which handled the markdown parsing). The mistune API changed significantly from 0.8 to 3.0. 3.0 includes a built in rst renderer (which this PR uses to replace the custom rst renderer). Mistune 3.0 also has a built-in math plugin. However, this is not compatible with the syntax used within the ASDF schemas. This PR uses the new mistune api and registers a custom plugin with regexes that are more similar to those used prior to this PR (using the exact regexes did not work and these needed changes to include inline flags, change group names, etc). (See related mistune math plugin issue: lepture/mistune#330).

This screenshot shows the conic schema in asdf-transform-schemas rendered with this PR. Showing both inline and block math rendering:
Screen Shot 2023-06-26 at 2 19 55 PM

Note that nbconvert (which also uses mistune and is the common cause of version conflicts with sphinx-asdf) only recently allowed mistune 3.0 so some users might need to update nbconvert.
jupyter/nbconvert#1820

Fixes: https://jira.stsci.edu/browse/AL-707

@braingram braingram changed the title remove mistune pin remove mistune approximate pin, add 3.0 compatibility, add 3.0 lower pin Jun 26, 2023
@braingram braingram marked this pull request as ready for review June 26, 2023 18:37
@braingram braingram merged commit 8ebdd6f into asdf-format:main Jul 5, 2023
14 checks passed
@braingram braingram deleted the mistune_3 branch July 5, 2023 18:55
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.

None yet

2 participants