Merge branch 'fix/mangadex-slash' into dev

This commit is contained in:
Alex Ling 2020-06-09 09:31:17 +00:00
commit 45cdfd5306
2 changed files with 8 additions and 1 deletions

View File

@ -68,4 +68,9 @@ describe Rule do
.should eq "Ch. CH ID testing" .should eq "Ch. CH ID testing"
rule.render({} of String => String).should eq "testing" rule.render({} of String => String).should eq "testing"
end end
it "escapes slash" do
rule = Rule.new "{id}"
rule.render({"id" => "/hello/world"}).should eq "_hello_world"
end
end end

View File

@ -135,7 +135,9 @@ module Rename
else else
e.render hash e.render hash
end end
end.join.strip end.join
.strip
.gsub("/", "_")
end end
end end
end end