FIX: correctly escape regex url

duplicate link detection could fail in certain cases
This commit is contained in:
Sam Saffron
2019-06-04 16:20:40 +10:00
parent 6428aa5b1f
commit 6300d978e2
2 changed files with 5 additions and 1 deletions

View File

@ -160,6 +160,9 @@ describe PlainTextToMarkdown do
context "links" do
it "removes duplicate links" do
expect(to_markdown("foo https://www.example.com/foo.html?a=1 <https://www.example.com/foo.html?a=1> bar"))
.to eq("foo https://www.example.com/foo.html?a=1 bar")
expect(to_markdown("foo https://www.example.com/foo.html <https://www.example.com/foo.html> bar"))
.to eq("foo https://www.example.com/foo.html bar")