-
Notifications
You must be signed in to change notification settings - Fork 208
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
Improve logseq tag handling #1083
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't entirely follow the non-greedy regex change because I'm not familiar enough with logseq to know what "page link-style tags" are. If you added such a tag to the tests somewhere that would be a nice touch.
Pinging @scross01 for possible input. |
The prefix causes taskwarrior to throw a "Malformed entry" error when applying a coefficient to the tag.
This ensures that page link-style tags are not inadvertently combined into a single match.
- The leading '#' is removed from the example tags. - Typos are corrected.
Three logseq-compatible tags are added to the test record: two in the 'page link' format and one in the conventional 'tag' format. The expected results demonstrate: - issue title: page link double brackets are replaced with special characters for taskwarrior compatibility - tags: - the conventional tag is added first - non-greedy regex matching prevents the inadvertent combination of the two page link tags into a single tag - the leading `#` is stripped from all tags
For improved maintainability, the logseq block URI in the expected results is now dynamically assigned by concatenating the base URI with the test record UUID.
Logseq supports several syntaxes, including:
I'll try to illustrate the issue with an example procedure:
By switching to non-greedy matching, the two page link-style tags are matched separately, resulting in the correct final list, Hope that makes sense! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Nice fix. Thanks |
This PR includes two fixes:
#
tag prefix to avoid "Malformed entry" errors in Taskwarrior when applying coefficients to tags.The relevant documentation is also updated.