Skip to content

Commit

Permalink
style: Import Markup
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Jan 10, 2025
1 parent 559c723 commit d195e41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mkdocs_autorefs/references.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
from urllib.parse import urlsplit
from xml.etree.ElementTree import Element

import markupsafe
from markdown.core import Markdown
from markdown.extensions import Extension
from markdown.extensions.toc import slugify
from markdown.inlinepatterns import REFERENCE_RE, ReferenceInlineProcessor
from markdown.treeprocessors import Treeprocessor
from markdown.util import HTML_PLACEHOLDER_RE, INLINE_PLACEHOLDER_RE
from markupsafe import Markup

if TYPE_CHECKING:
from collections.abc import Iterable
Expand Down Expand Up @@ -185,7 +185,7 @@ def _eval_id(self, data: str, index: int, text: str) -> tuple[str | None, str |
if match := HTML_PLACEHOLDER_RE.fullmatch(identifier):
stash_index = int(match.group(1))
html = self.md.htmlStash.rawHtmlBlocks[stash_index]
identifier = markupsafe.Markup(html).striptags()
identifier = Markup(html).striptags()
self.md.htmlStash.rawHtmlBlocks[stash_index] = escape(identifier)

end = m.end(0)
Expand Down

0 comments on commit d195e41

Please sign in to comment.