Open rgalonso opened 2 weeks ago
I think this stems from the earliest version of the action, which didn't support other identifiers, where I must have been like "nothing can ever feature the word todo in". 😆
Haha, yeah, I would've thought so too. Imagine my surprise when it actually happened to me: "autodocumentation". I wouldn't consider that one word, but evidently someone does because there it is in my project!
Yeah, I'm sure there are cases, word boundaries are definitely the way to go.
The identifier matching is not done using word breaks. Rather, it looks for either a whitespace character or a colon to follow the identifier. i.e.
TODO issue_title
andTODO: issue_title
will both match, butTODO
at the end of the line will not. However, this doesn't consider the possibility that non-whitespace characters precede the identifier. In other words, this means that due to this pattern match and case-insensitivity, usingFIX
as an identifier leads to the following comment being matchedThe
fix
ofsuffix
is seen as an identifier andafter the base string
is considered the issue title.Word breaks should be used for pattern matching the identifier. i.e.
\b{identifier}\b