Skip to content

Correctly handle overlapping raw HTML matches (2) - #770

Merged
waylan merged 5 commits into
Python-Markdown:masterfrom
PhilipTrauner:overlapping-matches
Feb 7, 2019
Merged

waylan merged 5 commits into
Python-Markdown:masterfrom
PhilipTrauner:overlapping-matches

Conversation

@PhilipTrauner

Copy link
Copy Markdown
Contributor

(Recreated because #769 didn't respect the Contributing Guide)

Instead of rewriting the raw HTML substitution logic I chose to run it recursively until the output is equal to the previous input.

With kinds regards,
Philip Trauner

@waylan waylan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the update.

However, I note that you added the test to the Legacy Tests rather than the new Markdown TestCase. We would prefer all new tests to use the new framework. Ideally, a new file would be created at tests/test_syntax/extensions/fenced_code.py, which included a markdown.test_tools.TestCase subclass with a method to test the relevant behavior.

As explained in #622 the goal is to eventually have all tests implemented in the new framework. Adding tests to the old only doubles the work so we'd prefer all new tests to be int he new framework.

Finally, please don't create a new PR. You may simply push any changes to your branch and GitHub will add them to this PR. We will squash the commits when we merge to master.

@waylan waylan added the requires-changes Awaiting updates after a review. label Dec 29, 2018
@waylan waylan added the bug Bug report. label Feb 7, 2019
@waylan waylan added this to the Version 3.1 milestone Feb 7, 2019
@waylan
waylan merged commit 12864d2 into Python-Markdown:master Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bug report. requires-changes Awaiting updates after a review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants