summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-04-16 08:56:08 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-04-29 07:28:33 +0200
commitd210107caaf221c17f19d56fc0ec76bf157eb044 (patch)
tree7e987b01f0120801e70cb980cadd848e4f85b757 /vendor
parent826128a8e03fb50f7287029ebac93c85712faecb (diff)
Bump github.com/fsmiamoto/git-todo-parser to latest version
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/fsmiamoto/git-todo-parser/todo/parse.go10
-rw-r--r--vendor/modules.txt2
2 files changed, 9 insertions, 3 deletions
diff --git a/vendor/github.com/fsmiamoto/git-todo-parser/todo/parse.go b/vendor/github.com/fsmiamoto/git-todo-parser/todo/parse.go
index 97c60db9d..ab3dd9ea9 100644
--- a/vendor/github.com/fsmiamoto/git-todo-parser/todo/parse.go
+++ b/vendor/github.com/fsmiamoto/git-todo-parser/todo/parse.go
@@ -56,9 +56,11 @@ func parseLine(line string) (Todo, error) {
fields := strings.Fields(line)
+ var commandLen int
for i := Pick; i < Comment; i++ {
if isCommand(i, fields[0]) {
todo.Command = i
+ commandLen = len(fields[0])
fields = fields[1:]
break
}
@@ -74,10 +76,14 @@ func parseLine(line string) (Todo, error) {
}
if todo.Command == Label || todo.Command == Reset {
- if len(fields) == 0 {
+ restOfLine := strings.TrimSpace(line[commandLen:])
+ if todo.Command == Reset && restOfLine == "[new root]" {
+ todo.Label = restOfLine
+ } else if len(fields) == 0 {
return todo, ErrMissingLabel
+ } else {
+ todo.Label = fields[0]
}
- todo.Label = fields[0]
return todo, nil
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 12028e79c..fd06a3ec6 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -30,7 +30,7 @@ github.com/emirpasic/gods/utils
# github.com/fatih/color v1.9.0
## explicit; go 1.13
github.com/fatih/color
-# github.com/fsmiamoto/git-todo-parser v0.0.4-0.20230403011024-617a5a7ce980
+# github.com/fsmiamoto/git-todo-parser v0.0.4
## explicit; go 1.13
github.com/fsmiamoto/git-todo-parser/todo
# github.com/fsnotify/fsnotify v1.4.7