1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

Revert "publisher: Get the collector in line with the io.Writer interface"

This reverts commit a9bcd38181ceb79afba82adcd4de1aebf571e74c.
This commit is contained in:
Bjørn Erik Pedersen
2021-05-19 03:45:30 +02:00
parent a9bcd38181
commit 3f515f0e33

View File

@ -152,21 +152,18 @@ type htmlElementsCollectorWriter struct {
}
// Write collects HTML elements from p.
func (w *htmlElementsCollectorWriter) Write(p []byte) (int, error) {
func (w *htmlElementsCollectorWriter) Write(p []byte) (n int, err error) {
n = len(p)
w.input = p
w.pos = 0
for {
w.r = w.next()
if w.r == eof {
break
return
}
w.state = w.state(w)
}
w.pos = 0
w.input = nil
return len(p), nil
}
func (l *htmlElementsCollectorWriter) backup() {