Accept comments when parsing fragment headers

Also parse the header directly instead of using a regexp. This allows
finer-grained errors.
This commit is contained in:
Billy Keyes
2019-03-24 20:49:27 -07:00
parent 47a74884a3
commit 699084298b
3 changed files with 44 additions and 33 deletions
+2
View File
@@ -27,6 +27,8 @@ type File struct {
// Fragment describes changed lines starting at a specific line in a text file.
type Fragment struct {
Comment string
OldPosition int64
OldLines int64