Trim space around keyword values

This commit is contained in:
Niklas Fasching 2018-12-19 00:55:49 +01:00
parent b2f4f6ac57
commit 144f2ce84f

View file

@ -111,8 +111,7 @@ func (d *Document) parseAffiliated(i int, stop stopFn) (int, Node) {
func parseKeyword(t token) Keyword {
k, v := t.matches[2], t.matches[4]
k = strings.ToUpper(k)
return Keyword{k, v}
return Keyword{strings.ToUpper(k), strings.TrimSpace(v)}
}
func (d *Document) newInclude(k Keyword) (int, Node) {