File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,14 @@ describe("tags.find_mentions", function()
4343 it (" finds simple filenames" , function ()
4444 assert .are .same ({ " foo.c" }, tags .find_mentions (" take methods in @foo.c" ))
4545 end )
46+
47+ it (" ignores trailing sentence punctuation" , function ()
48+ assert .are .same ({ " foo.lua" }, tags .find_mentions (" update @foo.lua." ))
49+ end )
50+
51+ it (" ignores trailing slashes" , function ()
52+ assert .are .same ({ " lua/jumpy" }, tags .find_mentions (" look at @lua/jumpy/" ))
53+ end )
4654end )
4755
4856describe (" tags.strip_mentions" , function ()
@@ -52,6 +60,14 @@ describe("tags.strip_mentions", function()
5260 tags .strip_mentions (" move helpers from @lua/jumpy/foo.lua into this file" )
5361 )
5462 end )
63+
64+ it (" removes mentions followed by sentence punctuation" , function ()
65+ assert .are .equal (" update ." , tags .strip_mentions (" update @foo.lua." ))
66+ end )
67+
68+ it (" removes mentions followed by trailing slashes" , function ()
69+ assert .are .equal (" look at" , tags .strip_mentions (" look at @lua/jumpy/" ))
70+ end )
5571end )
5672
5773describe (" tags.truncate_lines" , function ()
You can’t perform that action at this time.
0 commit comments