FIX: Support carriage return in InlineUploads.

Follow up to 8deaef3872.
This commit is contained in:
Guo Xiang Tan
2019-06-21 14:07:06 +08:00
parent 8deaef3872
commit 7c86f16aa3
2 changed files with 11 additions and 3 deletions

View File

@@ -325,6 +325,10 @@ RSpec.describe InlineUploads do
<img src="#{upload2.url}" alt="test" width="500" height="500">
</a>
MD
md = "<h1></h1>\r\n<a href=\"http://somelink.com\">\r\n <img src=\"#{upload.url}\" alt=\"test\" width=\"500\" height=\"500\">\r\n</a>"
expect(InlineUploads.process(md)).to eq("<h1></h1>\r\n<a href=\"http://somelink.com\">\r\n <img src=\"#{upload.short_path}\" alt=\"test\" width=\"500\" height=\"500\">\r\n</a>")
end
it "should correctly update image sources within anchor or paragraph tags" do