Closed daxcore closed 9 months ago
Thank you for for nice suggestion and even PR!
I understand all your code and intension of the suggestion. It looks awesome.
Somehow, I fixed the broken unit test and added some unittest on it. As you might noticed that this project is just my side project and there are many bugs.
So there is no branch strategy or delicated ci-cd process. I would merge all your PR on main but would not release until handle below issues.
add unit test on TagConversion.
(this is suggestion) update OBSIDIAN_TAGS_REGEX to esacpe on \
prefix (e.g. #sometag)
After I see this issue. I worried that it would convert not only tags but naive hashtags or # started strings.
this forum - /is-it-possible-to-ignore-certain-tags is about same issue and it says add backslash (\
) can be a solution and i think it is very good.
(this is suggestion too) add # (%23)
on tag href.
so the query can be search the actual tag.
If you want to finish this feature by your own. Please consider work on abover three issues. Or you may agree, I would develop them and ask review to you, or I just do everything.
Please tell me your comment on above plan. I would merge all opened PR till this weekend.
thanks for ur interest into this feature. i would be happy if u could add the unit-tests.
i updated the regex string to prevent tags prefixed by backslash and inside of codeblocks.
like this:
#tag
# notag
(#notag)
[#notag]
[[#notag]]
\#notag
#notag
#notag
i don't understand the third point. currently, the # symbol is just added by javascript while runtime. the hashtag of obsidian files will be ignored by the regex string. the match group just contains the tagname. so the link, searchs for all locations, where this word/tagname was used, also that ones, not prefixed as a tag.
please feel free to finish this pull-request. i could do a review in the end, or i would open a new issue, if there are suggestions by my side ;)
the #tags will be converted into tags{: .hash} this .hash class can be used for javascript and css
prerequisites:
mkdocs.yml:
obsidian_tags.css:
obsidian_tags.js: