Fish Trophy

chipx86 got a fish trophy!

Fix unit test regressions for Markdown rendering.

Review Request #11611 — Created May 20, 2021 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

Some of the recent releases of Python-Markdown, along with some of the
recent fixes merged in from release-3.0.x, resulted in some regressions
in the expected Markdown rendering results in unit tests. These
regressions are, for the most part, not something users will need to
worry about.

Some of the regressions were in the XSS unit tests. These aren't
security regressions, just expected string regressions. Python Markdown
3.0 changed some of the parsing, supporting "title" in link URLs, and
these captured strings in JavaScript code, turning them into title=
attributes. Tests were updated for the new strings.

Python Markdown 3.2 added <code> elements to each line in a code
block, which new tests from release-3.0.x weren't accounting for. Since
we support 3.1 and 3.3+ (depending on the Python version), these testsn
ow check for the right string for the right version.

And finally, the one user-facing change is that nested bold/italic (in
the form of *this is **a** test* renders entirely as a series of
italic blocks on Python Markdown 3.2. The working alternative is
*this is __a__ test*. Tests were updated for this as well.
Unfortunately, there doesn't seem to be a way to restore prior
formatting, but hopefully this doesn't affect many people.

See https://github.com/Python-Markdown/markdown/issues/792 for the
bold/italic changes in Python Markdown.

Unit tests pass on all supported versions of Python, with all supported
versions of Python Markdown.

Commits

Files

    Loading...