mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-24 05:42:40 +08:00
meta: fix newline handling
This commit is contained in:
parent
eb9f094a2d
commit
ecee64f778
@ -45,7 +45,7 @@ func ExtractMeta(data []byte) (*Meta, []byte, error) {
|
|||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
offset += len(line)
|
offset += len(line) + 1
|
||||||
|
|
||||||
matches := reHeaderPatternV2.FindStringSubmatch(line)
|
matches := reHeaderPatternV2.FindStringSubmatch(line)
|
||||||
if matches == nil {
|
if matches == nil {
|
||||||
@ -119,5 +119,5 @@ func ExtractMeta(data []byte) (*Meta, []byte, error) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return meta, data[offset+1:], nil
|
return meta, data[offset:], nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user