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

Issue: "Inline" ToDos not captured #47

Closed
mcguinlu opened this issue May 13, 2021 · 1 comment · Fixed by #48
Closed

Issue: "Inline" ToDos not captured #47

mcguinlu opened this issue May 13, 2021 · 1 comment · Fixed by #48

Comments

@mcguinlu
Copy link
Contributor

Hi @dokato,

Very last thing (promise!) - when checking out the results of the new functionality in #46, I noticed that "inline" comments are not captured by todor, e.g. if I have the following text in an Rmarkdown doc on line 147:

Participants were followed up, and were censored at the earliest of date of diagnosis, death, date of transfer out of the study cohort or end of follow-up ( <!-- TODO Get date here --> )

This does not appear as a marker when running todor() (no "Line 147"):

Screenshot 2021-05-13 121403

Is this known behaviour?

@dokato
Copy link
Owner

dokato commented May 13, 2021

Thanks for reporting that @mcguinlu . Indeed, that's again my lack of general thinking. You can see that the pattern detects both hash and HTML comment tags but only at the beginning of the line: https://github.com/dokato/todor/blob/master/R/patterns.R#L21 , in case of nothing is detected we proceed with inline_pattern that seems to detect only hashes now... This needs to be fixed.

A completely different story is multiline comments as requested in #43 ; so far TODOr iterates line by line over code to detect appropriate tags. I need to think more how to neatly account for that 🤔 Shouldn't be quantum physics though...

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 a pull request may close this issue.

2 participants