mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
markup/goldmark: Fail on invalid Markdown attributes
This commit is contained in:
@@ -392,3 +392,17 @@ func extractPosition(e error) (pos text.Position) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// TextSegmentError is an error with a text segment attached.
|
||||
type TextSegmentError struct {
|
||||
Segment string
|
||||
Err error
|
||||
}
|
||||
|
||||
func (e TextSegmentError) Unwrap() error {
|
||||
return e.Err
|
||||
}
|
||||
|
||||
func (e TextSegmentError) Error() string {
|
||||
return e.Err.Error()
|
||||
}
|
||||
|
Reference in New Issue
Block a user