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:
@ -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