Skip to content

Commit

Permalink
Revert: Use simplified regex for html placeholders
Browse files Browse the repository at this point in the history
Not sure how tests didn't get run on this, but it was completely
breaking all tests. This reverts the change.
  • Loading branch information
facelessuser authored and waylan committed Apr 6, 2020
1 parent c5f1395 commit 7c595e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions docs/change_log/release-3.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,4 @@ The following bug fixes are included in the 3.2 release:
* HTML tag placeholders are no longer included in `.toc_tokens` (#899).
* Unescape backslash-escaped characters in TOC ids (#864).
* Refactor bold and italic logic in order to solve complex nesting issues (#792).
* Always wrap CodeHilite code in <code> tags (#862) </code>
* Regex for HTML placeholders simplified for speed improvement (#928).
* Always wrap CodeHilite code in `code` tags (#862)
2 changes: 1 addition & 1 deletion markdown/postprocessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def run(self, text):
replacements[self.md.htmlStash.get_placeholder(i)] = html

if replacements:
pattern = util.HTML_PLACEHOLDER_RE
pattern = re.compile("|".join(re.escape(k) for k in replacements))
processed_text = pattern.sub(lambda m: replacements[m.group(0)], text)
else:
return text
Expand Down

0 comments on commit 7c595e2

Please sign in to comment.