Include file name in parse error message
Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
This commit is contained in:
parent
55b85080f0
commit
d31a96a3c0
1 changed files with 1 additions and 1 deletions
|
@ -241,7 +241,7 @@ func (d *Document) parseOne(i int, stop stopFn) (consumed int, node Node) {
|
||||||
if consumed != 0 {
|
if consumed != 0 {
|
||||||
return consumed, node
|
return consumed, node
|
||||||
}
|
}
|
||||||
d.Log.Printf("Could not parse token %#v: Falling back to treating it as plain text.", d.tokens[i])
|
d.Log.Printf("Could not parse token %#v in file %s: Falling back to treating it as plain text.", d.tokens[i], d.Path)
|
||||||
m := plainTextRegexp.FindStringSubmatch(d.tokens[i].matches[0])
|
m := plainTextRegexp.FindStringSubmatch(d.tokens[i].matches[0])
|
||||||
d.tokens[i] = token{"text", len(m[1]), m[2], m}
|
d.tokens[i] = token{"text", len(m[1]), m[2], m}
|
||||||
return d.parseOne(i, stop)
|
return d.parseOne(i, stop)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue