Skip to content

Commit

Permalink
config: broaden the tolerance of the detection of the command
Browse files Browse the repository at this point in the history
One user has the habit of writing one-liners as commit messages, and has used the command at the end of the very first line.

/spent 20m
  • Loading branch information
Goutte committed Jan 30, 2024
1 parent 21bf91a commit 203cfd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gitime/grammar.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package gitime

import "regexp"

var commandRegex = "^\\s*/spen[dt]\\s*"
var commandRegex = "/spen[dt]\\s*:?\\s*"
var floatRegex = "[0-9]+[.]?[0-9]*|[0-9]*[.]?[0-9]+"

// no negative lookahead in regexp, so we hack around it (to ignore datetime suffix)
Expand Down

0 comments on commit 203cfd9

Please sign in to comment.