transform/livereloadinject: Inject livereload script right after head if possible
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 29 Jan 2020 11:46:18 +0000 (12:46 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 29 Jan 2020 20:12:07 +0000 (21:12 +0100)
commit8f08cdd0ac6a2decd5aa5c9c12c0b2c264f9a989
tree5f779cd8145eaf6aca92fa016e24334987d9829a
parent281abb18ee39fa2b5d4782b64f27cffcbf4e0240
transform/livereloadinject: Inject livereload script right after head if possible

We used to insert the livereload script right before the closing body.

This dord  not work when combined with tools such as Turbolinks.

This commit changes it So we try to inject the script as early as possible.

Fixes #6821
transform/livereloadinject/livereloadinject.go
transform/livereloadinject/livereloadinject_test.go