diff options
Diffstat (limited to 'transform')
-rw-r--r-- | transform/livereloadinject.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/transform/livereloadinject.go b/transform/livereloadinject.go index 9eab45f78..bd22901df 100644 --- a/transform/livereloadinject.go +++ b/transform/livereloadinject.go @@ -24,12 +24,12 @@ func LiveReloadInject(ct contentTransformer) { replaceTemplate := `<script data-no-instant>document.write('<script src="/livereload.js?mindelay=10"></' + 'script>')</script>%s` replace := []byte(fmt.Sprintf(replaceTemplate, endBodyTag)) - newcontent := bytes.Replace(ct.Content(), match, replace, -1) + newcontent := bytes.Replace(ct.Content(), match, replace, 1) if len(newcontent) == len(ct.Content()) { endBodyTag = "</BODY>" replace := []byte(fmt.Sprintf(replaceTemplate, endBodyTag)) match := []byte(endBodyTag) - newcontent = bytes.Replace(ct.Content(), match, replace, -1) + newcontent = bytes.Replace(ct.Content(), match, replace, 1) } ct.Write(newcontent) |