mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Revert "publisher: Get the collector in line with the io.Writer interface"
This reverts commit a9bcd38181
.
This commit is contained in:
@@ -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() {
|
||||
|
Reference in New Issue
Block a user