From 25a0d6465ccc0d65c95baed1863758d0b2dbb51b Mon Sep 17 00:00:00 2001 From: Sam Hunter Date: Mon, 10 Dec 2012 02:48:41 -0500 Subject: [PATCH] Don't insert livereload script tag after
tags --- lib/rack-livereload.rb | 2 +- lib/rack/livereload.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rack-livereload.rb b/lib/rack-livereload.rb index 6926f1d..ff8062e 100644 --- a/lib/rack-livereload.rb +++ b/lib/rack-livereload.rb @@ -1,6 +1,6 @@ require "rack/livereload" class Rack::LiveReload - VERSION = '0.3.9' + VERSION = '0.4.0' end diff --git a/lib/rack/livereload.rb b/lib/rack/livereload.rb index 803c4c5..31cb54a 100644 --- a/lib/rack/livereload.rb +++ b/lib/rack/livereload.rb @@ -77,7 +77,7 @@ module Rack template = ERB.new(::File.read(::File.expand_path('../../../skel/livereload.html.erb', __FILE__))) if line[']*>/) { |match| %{#{match}#{template.result(binding)}} } + line.gsub!(/])*>/) { |match| %{#{match}#{template.result(binding)}} } end headers["X-Rack-LiveReload"] = '1'