fix: handle identifier with regex characters

Provides a test for and the solution to GitHub
issue #242. Namely, an identifier which contains
regex characters (e.g. "[TODO]") is properly
handled by having the parser look for literal
"[" and "]" characters rather than treating those
characters as part of a regex pattern. The word
boundary regex pattern '\b' does NOT properly
handle this, so a slightly different pattern is
used to identify the boundary.
This commit is contained in:
Robert Alonso
2024-11-12 16:07:05 +00:00
parent 59c6b5395c
commit 2d98b5c359
5 changed files with 30 additions and 10 deletions

View File

@@ -58,7 +58,7 @@ index 0000000..525e25d
+ # TODO: Come up with a more imaginative greeting
+ print('Hello world')
+
+ # TODO: Do more stuff
+ # [TODO]: Do more stuff
+ # This function should probably do something more interesting
+ # labels: help wanted
+