diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2018-12-14 12:41:55 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2018-12-14 16:03:58 +0300 |
commit | baead4ea4b84ab1190b87a2dc73cdc4afaa6ebc6 (patch) | |
tree | 9f602b5abff3daafedb34bf50c4967a6503e4511 /test | |
parent | 91236c60c7aa266c1e874ebdd2aa44becfc6709b (diff) | |
download | pleroma-baead4ea4b84ab1190b87a2dc73cdc4afaa6ebc6.tar.gz pleroma-baead4ea4b84ab1190b87a2dc73cdc4afaa6ebc6.zip |
fix markdown formatting
Diffstat (limited to 'test')
-rw-r--r-- | test/formatter_test.exs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/formatter_test.exs b/test/formatter_test.exs index 428227d78..bb318b7d5 100644 --- a/test/formatter_test.exs +++ b/test/formatter_test.exs @@ -257,4 +257,23 @@ defmodule Pleroma.FormatterTest do text = nil assert Formatter.get_emoji(text) == [] end + + describe "/mentions_escape" do + test "it returns text with escaped mention names" do + text = """ + @a_breakin_glass@cybre.space + (also, little voice inside my head thinking "maybe this will encourage people + pronouncing it properly instead of saying _raKEWdo_ ") + """ + + escape_text = """ + @a\\_breakin\\_glass@cybre\\.space + (also, little voice inside my head thinking \"maybe this will encourage people + pronouncing it properly instead of saying _raKEWdo_ \") + """ + + mentions = [{"@a_breakin_glass@cybre.space", %{}}] + assert Formatter.mentions_escape(text, mentions) == escape_text + end + end end |