Skip to content

Commit b2cec2a

Browse files
committed
escape the # in link frag
https://regex101.com/r/e0GW4n/1
1 parent e2b649e commit b2cec2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mkdocs_autolinks_plugin/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# 6. Image title (in quotation marks)
2121

2222
AUTOLINK_RE = (
23-
r"(?:\!\[\]|\[([^\]]+)\])\((([^)/]+\.(md|png|jpg|jpeg|bmp|gif|svg|webp))(#[^)]*)*)(\s(\".*\"))*\)"
23+
r"(?:\!\[\]|\[([^\]]+)\])\((([^)/]+\.(md|png|jpg|jpeg|bmp|gif|svg|webp))(\#[^)]*)*)(\s(\".*\"))*\)"
2424
)
2525

2626
class AutoLinkReplacer:

0 commit comments

Comments
 (0)