FIX: supports escape sequence in chat (#29659)

Writing `\*test\*` will now correctly cook `*test*`, and not `<em>test</em>`.
This commit is contained in:
Joffrey JAFFEUX
2024-11-08 15:28:50 +09:00
committed by GitHub
parent 032b1f871b
commit 467ecbabf5
2 changed files with 7 additions and 0 deletions

View File

@ -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`")