Skip to content

Commit 55464a6

Browse files
fix: set header during descriptionToken instead of bodyToken
1 parent 73edbc5 commit 55464a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

parser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ func (p *Parser) parse(input string) (*Commit, error) {
4747
c.scope = t.Value
4848
case descriptionToken:
4949
c.description = t.Value
50+
c.header = strings.TrimSpace(lex.Get(0, t.End))
5051
case bodyToken:
51-
c.header = strings.TrimSpace(lex.Get(0, t.Start))
5252
c.body = strings.TrimSpace(t.Value)
5353
case footerKeyToken:
5454
if footerStartPos == 0 {

0 commit comments

Comments
 (0)