Skip to content
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: CJK hashtag update failure #6479

Merged
merged 1 commit into from Aug 25, 2022

Conversation

cnrpman
Copy link
Collaborator

@cnrpman cnrpman commented Aug 25, 2022

Fix #6451

Notice: This is not a new bug introduced in recent version. This is a legacy bug.

@cnrpman cnrpman force-pushed the fix-hashtag-CJK-update branch 2 times, most recently from 00e7512 to ca40183 Compare August 25, 2022 11:34
Copy link
Collaborator

@logseq-cldwalker logseq-cldwalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cnrpman Thanks for fixing with tests! 🐛 ⚡ QAed and works great

(-> (util/replace-ignore-case content (str "^" old-tag "\\b") new-tag)
(util/replace-ignore-case (str " " old-tag " ") (str " " new-tag " "))
(util/replace-ignore-case (str " " old-tag "$") (str " " new-tag)))))
;; hash tag parsing rules https://github.com/logseq/mldoc/blob/701243eaf9b4157348f235670718f6ad19ebe7f8/test/test_markdown.ml#L631
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@tiensonqin tiensonqin merged commit 8dfa8df into logseq:master Aug 25, 2022
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.

Hashtag with chinese character wouldn't be updated on rename
3 participants