Change inline URL matcher to only match strings, not newlines. Fixes #1689

This commit is contained in:
Thomas Reynolds 2015-12-13 13:06:05 -08:00
parent d3a5494062
commit 76f591788e
9 changed files with 24 additions and 3 deletions

View file

@ -332,7 +332,9 @@ module Middleman
Contract String, String, ArrayOf[String], Proc => String
def rewrite_paths(body, _path, exts, &_block)
body.dup.gsub(/([=\'\"\(,]\s*)([^\s\'\"\)>]+(#{Regexp.union(exts)}))/) do |match|
matcher = /([=\'\"\(,] *)([^\s\'\"\)>]+(#{Regexp.union(exts)}))/
body.dup.gsub(matcher) do |match|
opening_character = $1
asset_path = $2