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

Update to Mistune 2.0.2 #1764

Merged
merged 6 commits into from
May 9, 2022
Merged

Update to Mistune 2.0.2 #1764

merged 6 commits into from
May 9, 2022

Conversation

marmitar
Copy link
Contributor

@marmitar marmitar commented Apr 23, 2022

Mistune 2.0 was major overhaul, requiring a lot of changes on the markdown2html_mistune filter. I understand that the update may noy be desirable (see #1685), but I'm leaving this here as an option. Still, some more testing seems needed.

Possible problems

@blink1073
Copy link
Contributor

Thanks for working on this @TiagodePAlves! I think what you've done so far is a great approach to keeping backwards compatibility. I'd say if we get the existing test suite to pass, we should merge this PR. Pinning isn't a long term solution, and vendoring mistune 0.8.4 does not sound fun either. f-strings are totally fine!

@marmitar
Copy link
Contributor Author

Ok, I think the regexes may be the problem. I'll push it as soon as I fix it.

@blink1073
Copy link
Contributor

No rush, thanks again for taking this up!

@marmitar
Copy link
Contributor Author

I rewrote the regexes and they were passing the test_markdown2html* tests now. I couldn't test everything because pyppeteer hangs indefinitely while creating a new page.

@blink1073
Copy link
Contributor

All green in CI!

@bollwyvl @SylvainCorlay I propose we release a 7.0rc0 with this change.

@marmitar marmitar marked this pull request as ready for review April 28, 2022 03:18
Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM!

marmitar and others added 5 commits May 9, 2022 06:12
- 'AXT_HEADING' is now requiring whitespace after the '#', fixed with a new regex
- 're.Scanner' is not able to extract the correct group, the text needs trimming before use
- 'javascript:...' links considered harmful by 'HTMLRenderer', should we disable it too?
Important to avoid problems with the TeX-style block math where the trailing '$$' is not removed.
@blink1073 blink1073 merged commit e870d9a into jupyter:main May 9, 2022
@EwoutH
Copy link

EwoutH commented May 13, 2022

Thanks a lot for this!

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.

3 participants