mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 20:52:46 +08:00
DEV: improve spec to specify all code block formats
Previously we only covered a few, this covers a few more formats.
This commit is contained in:
parent
89c4332ac1
commit
739696fdf0
|
@ -60,11 +60,21 @@ RSpec.describe InlineUploads do
|
|||
end
|
||||
|
||||
it "should not correct code blocks" do
|
||||
md = "`<a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>`"
|
||||
|
||||
expect(InlineUploads.process(md)).to eq(md)
|
||||
md = <<~MD
|
||||
`<a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>`
|
||||
|
||||
md = " <a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>"
|
||||
<a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>
|
||||
|
||||
```
|
||||
<a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>
|
||||
```
|
||||
a [code]<a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>[/code] b
|
||||
|
||||
[code]
|
||||
<a class=\"attachment\" href=\"#{upload2.url}\">In Code Block</a>
|
||||
[/code]
|
||||
MD
|
||||
|
||||
expect(InlineUploads.process(md)).to eq(md)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user