mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
markup/goldmark: Fail on invalid Markdown attributes
This commit is contained in:
@@ -617,7 +617,13 @@ func (p *pageState) wrapError(err error) error {
|
||||
}
|
||||
}
|
||||
|
||||
return herrors.NewFileErrorFromFile(err, filename, p.s.SourceSpec.Fs.Source, herrors.NopLineMatcher)
|
||||
lineMatcher := herrors.NopLineMatcher
|
||||
|
||||
if textSegmentErr, ok := err.(*herrors.TextSegmentError); ok {
|
||||
lineMatcher = herrors.ContainsMatcher(textSegmentErr.Segment)
|
||||
}
|
||||
|
||||
return herrors.NewFileErrorFromFile(err, filename, p.s.SourceSpec.Fs.Source, lineMatcher)
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user