Escape regex characters in paths to match (#8138)
Merge pull request 8138
This commit is contained in:
parent
c8c3891cab
commit
47e3644cd5
|
@ -32,7 +32,7 @@ class TestConvertible < JekyllUnitTest
|
||||||
assert_equal({}, ret)
|
assert_equal({}, ret)
|
||||||
end
|
end
|
||||||
assert_match(%r!YAML Exception!, out)
|
assert_match(%r!YAML Exception!, out)
|
||||||
assert_match(%r!#{File.join(@base, name)}!, out)
|
assert_match(%r!#{Regexp.escape(File.join(@base, name))}!, out)
|
||||||
end
|
end
|
||||||
|
|
||||||
should "raise for broken front matter with `strict_front_matter` set" do
|
should "raise for broken front matter with `strict_front_matter` set" do
|
||||||
|
@ -57,7 +57,7 @@ class TestConvertible < JekyllUnitTest
|
||||||
assert_equal({}, ret)
|
assert_equal({}, ret)
|
||||||
end
|
end
|
||||||
assert_match(%r!invalid byte sequence in UTF-8!, out)
|
assert_match(%r!invalid byte sequence in UTF-8!, out)
|
||||||
assert_match(%r!#{File.join(@base, name)}!, out)
|
assert_match(%r!#{Regexp.escape(File.join(@base, name))}!, out)
|
||||||
end
|
end
|
||||||
|
|
||||||
should "parse the front matter but show an error if permalink is empty" do
|
should "parse the front matter but show an error if permalink is empty" do
|
||||||
|
|
Loading…
Reference in New Issue