mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Revert "publisher: Get the collector in line with the io.Writer interface"
This reverts commit a9bcd38181
.
This commit is contained in:
parent
a9bcd38181
commit
3f515f0e33
1 changed files with 4 additions and 7 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue