Add support for two features: Obsidian Wiki Links with anchors, and handling files in subdirectories during link generation#20
Open
Zhaosn wants to merge 4 commits intoCyrusky:mainfrom
Open
Conversation
refactor: reconstruct the file path processing and search logic
Author
|
It works well for me: http://blog.zhaosn.top/ESP32-examples/00.overview/ (BTW, this is my study notes on the official ESP32 ESP-IDF examples. Perhaps it's called native development or something like that.) |
When generating anchor links, replace the underlines, dots and spaces with hyphens to ensure that the links can function correctly for navigation.
Zhaosn
commented
Jan 22, 2026
| if (anchor) { | ||
| // For links with anchor, use direct HTML link to preserve anchor | ||
| // Replace underscores, dots and spaces with hyphens in anchor | ||
| const formattedAnchor = anchor.replace(/[_\. ]/g, '-'); |
Author
There was a problem hiding this comment.
Change to /[_\.\\\/ ]/g to support "\" or "/"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New Features
Enhanced Obsidian Wiki Link Support:
[[title#subtitle]]) to static web links with anchorsTesting steps
hexo clean && hexo generatehexo s -sKnown Issue (Requires Hexo Config Change, Unfixable via Plugin Modifications)
Zhaosn#2
bug fixed
Zhaosn#1
Note
Due to my unfamiliarity with the
npm run buildcommand (and the files generated by this command are excessively large), I directly replacing the file content instead of the standard build process.