Skip to content

Support Local Links without anchor#49

Merged
manuzhang merged 16 commits intomanuzhang:mainfrom
kolibri91:feature/local-links
Mar 6, 2023
Merged

Support Local Links without anchor#49
manuzhang merged 16 commits intomanuzhang:mainfrom
kolibri91:feature/local-links

Conversation

@kolibri91
Copy link
Copy Markdown
Contributor

@kolibri91 kolibri91 commented Feb 20, 2023

I originally started with the problem of a link without an anchor.
Those links are currently just ignored. I changed this by another regex.
But then I ran into trouble with other files (e.g. graphics in combination with glightbox-plugin) which have may a link as well.

Solution

  1. Accept links without anchor
  2. Check if it targets markdown -> use existing code and search for anchor if there is one
  3. Other target -> just look for the source file

Optimization

  1. I optimized the code by using dict, I have no strong opinion about that and I could revert this if required.

@kolibri91 kolibri91 marked this pull request as ready for review February 20, 2023 09:44
@manuzhang manuzhang self-requested a review February 20, 2023 10:41
@manuzhang
Copy link
Copy Markdown
Owner

manuzhang commented Mar 3, 2023

@kolibri91 thanks for contribution. Could you add an integration test as well?
cc @johnthagen to take a look.

@kolibri91
Copy link
Copy Markdown
Contributor Author

@kolibri91 thanks for contribution. Could you add an integration test as well? cc @johnthagen to take a look.

Sure, thanks for you feedback. I will check and contribute to the tests soon.

@manuzhang
Copy link
Copy Markdown
Owner

Is the image file hand-drawn or from the web? Shall we add an attribution?

@kolibri91
Copy link
Copy Markdown
Contributor Author

Is the image file hand-drawn or from the web? Shall we add an attribution?

Handdrawn by me in 2mins. Not worth to have an attribution.

@manuzhang
Copy link
Copy Markdown
Owner

@kolibri91 Thanks! LGTM, merging...

@manuzhang manuzhang merged commit 45253f2 into manuzhang:main Mar 6, 2023
@kolibri91 kolibri91 deleted the feature/local-links branch April 13, 2023 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants