intesso/connect-livereload

<pre> trap for snippet

pepelsbey opened this issue · 1 comments

For some reason live reload script snippet is appearing inside <pre> element if you have &lt; plus \n there and don’t have optional <body> element. I would expect it to appear right after <p>bar</p> instead. This document is completely valid:

<!DOCTYPE html>
<title>Title</title>
<p>foo</p>
<pre>&lt;
</pre>
<p>bar</p>

It wouldn’t be a problem if it wasn’t <pre> element: I’m getting an extra line inside it because of misplaced snippet.

screen shot 2014-09-21 at 18 04 49

I’m using v0.4.0 as part of grunt-contrib-connect v0.8.0.

This is solved by PR #50, currently on v0.5.0.
grunt-contrib-connect will apply this update on v0.9.0.