FIX: make markdown regexp patterns case insensitive.

This commit is contained in:
Vinoth Kannan
2019-09-12 22:25:15 +05:30
parent 568232052e
commit 321f559c7c
2 changed files with 17 additions and 3 deletions

View File

@ -206,6 +206,20 @@ RSpec.describe InlineUploads do
MD
end
it "should correct html and markdown uppercase references" do
md = <<~MD
[IMG]#{upload.url}[/IMG]
<IMG src="#{upload2.url}" />
<A class="attachment" href="#{upload3.url}">Text</A>
MD
expect(InlineUploads.process(md)).to eq(<<~MD)
![](#{upload.short_url})
![](#{upload2.short_url})
[Text|attachment](#{upload3.short_url})
MD
end
context "subfolder" do
before do
global_setting :relative_url_root, "/community"