mirror of
https://github.com/discourse/discourse.git
synced 2024-11-21 16:38:15 -06:00
FIX: supports escape sequence in chat (#29659)
Writing `\*test\*` will now correctly cook `*test*`, and not `<em>test</em>`.
This commit is contained in:
parent
032b1f871b
commit
467ecbabf5
@ -220,6 +220,7 @@ module Chat
|
||||
blockquote
|
||||
emphasis
|
||||
replacements
|
||||
escape
|
||||
]
|
||||
|
||||
def self.cook(message, opts = {})
|
||||
|
@ -133,6 +133,12 @@ describe Chat::Message do
|
||||
expect(cooked).to eq("<p>—</p>")
|
||||
end
|
||||
|
||||
it "supports escape sequence" do
|
||||
cooked = described_class.cook('\*test\*')
|
||||
|
||||
expect(cooked).to eq("<p>*test*</p>")
|
||||
end
|
||||
|
||||
it "supports backticks rule" do
|
||||
cooked = described_class.cook("`test`")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user