summaryrefslogtreecommitdiffstats
path: root/parser/pageparser/pagelexer_intro.go
diff options
context:
space:
mode:
Diffstat (limited to 'parser/pageparser/pagelexer_intro.go')
-rw-r--r--parser/pageparser/pagelexer_intro.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/parser/pageparser/pagelexer_intro.go b/parser/pageparser/pagelexer_intro.go
index 6e4617998..25af4170b 100644
--- a/parser/pageparser/pagelexer_intro.go
+++ b/parser/pageparser/pagelexer_intro.go
@@ -13,6 +13,10 @@
package pageparser
+import "errors"
+
+var ErrPlainHTMLDocumentsNotSupported = errors.New("plain HTML documents not supported")
+
func lexIntroSection(l *pageLexer) stateFunc {
l.summaryDivider = summaryDivider
@@ -45,7 +49,7 @@ LOOP:
l.emit(TypeIgnore)
continue LOOP
} else {
- return l.errorf("plain HTML documents not supported")
+ return l.documentError(ErrPlainHTMLDocumentsNotSupported)
}
}
break LOOP