remove mistune approximate pin, add 3.0 compatibility, add 3.0 lower pin #68
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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