-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #11: Adapt link regex to exclude anchor links #14
Conversation
- Changes the LINK_PATTERN_REGEX to only match links that don't start with a hash by adding '[^#]' in front of the link_url group.
Note that this doesn't fix links to anchors on other pages, see #11 (comment). |
This currently needs more work, so returning it to draft mode. |
* Add test dependencies and document how to install and run tests * Add regression tests for different types of links * Fix fire1ce#11 properly: Test for `#` prefix in links * Rolls back the broken fix in 8d4b5ee *Fixes fire1ce#11 by checking for a hash prefix in closure code
@sdruskat thanks for a PR. l'll try to review it as soon as possible but it may take some time since im busy in the near future. Hope to find some proper time to review the changes. |
@fire1ce Thanks for the quick note! I know what it's like, appreciate your maintenance of this open source project, and don't place any expectations on you w.r.t. a quick review/merge. |
Thanks agan. Sorry im very late. |
First up, thanks for a very helpful plugin!
I've stumbled over #11 just now and am supplying a fix in this PR.
[^#]
in front of thelink_url
group.mkdocs
v1.5.3 (mkdocs new .
, add external page with anchor links, e.g., this README:{{ external_markdown('https://raw.githubusercontent.com/fefong/markdown_readme/master/README.md', '') }}
.I hope this is acceptable. Please let me know shold you need anything changed, and feelf free to edit yourself.