Skip to content

Commit a1ba3e2

Browse files
tvdboompawamoy
authored andcommitted
not only <a
1 parent b093e5d commit a1ba3e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mkdocs_autorefs/plugin.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ def on_page_content(self, html: str, page: Page, **kwargs: Any) -> str: # noqa:
179179
self.map_urls(page.url, item)
180180

181181
if self.config["scan_html_tags"]:
182-
# Matches any html anchor with the id property (<a id="xx">)
183-
for match in re.findall(r"""<a .*?id=["']([_\w-]*)["'].*?>""", html):
182+
# Matches any html anchors with the id property (e.g. <a id="xx">)
183+
for match in re.findall(r"""<.*?id=["']([_\w-]*)["'].*?>""", html):
184184
self.register_anchor(page.url, match)
185185

186186
return html

0 commit comments

Comments
 (0)