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(markers): Preserve TODO markers when autolinking #75

Merged
merged 5 commits into from
Apr 28, 2024

Conversation

markscamilleri
Copy link
Contributor

Problem

If I have a page that's titled the same as one of the TODO markers, which are defined as1:

(defonce built-in-markers
  ["NOW" "LATER" "DOING" "DONE" "CANCELED" "CANCELLED" "IN-PROGRESS" "TODO" "WAIT" "WAITING"])

the plugin modifies the marker and places a link around that, such that given there exists a page "todo", for a to do item such as:

TODO This is a todo

the plugin transforms this to:

[[TODO]] This is a [[todo]]

which ruins the reason the marker is there in the first place (it was wrecking havoc with my queries too).

Solution

Get the plugin to ignore markers at the start of a line. The above example now becomes:

TODO This is a [[todo]]

Footnotes

  1. Taken from the logseq repository

@markscamilleri
Copy link
Contributor Author

Hi @sawhney17, sorry to bump this but this is an issue that I keep facing when using this plugin. I was wondering if we can get this fix merged in?

@sawhney17
Copy link
Owner

Apologies for missing this. Nice approach for fixing it! Merging now :)

Thank you so much for this PR!

@sawhney17 sawhney17 merged commit e543235 into sawhney17:main Apr 28, 2024
1 check passed
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