diff --git a/zerver/fixtures/markdown_test_cases.json b/zerver/fixtures/markdown_test_cases.json index 92c046d1f1..afb41d537c 100644 --- a/zerver/fixtures/markdown_test_cases.json +++ b/zerver/fixtures/markdown_test_cases.json @@ -188,6 +188,12 @@ "expected_output": "

I like software love hardware

", "text_content": "I like software love hardware" }, + { + "name": "strikthrough_link", + "input": "~~test http://xx.xx link~~", + "expected_output": "

test http://xx.xx link

", + "text_content": "test http://xx.xx link" + }, { "name": "underscore_disabled", "input": "_foo_", diff --git a/zerver/lib/bugdown/__init__.py b/zerver/lib/bugdown/__init__.py index ccb8866d85..0b9cca504c 100644 --- a/zerver/lib/bugdown/__init__.py +++ b/zerver/lib/bugdown/__init__.py @@ -1395,7 +1395,7 @@ class Bugdown(markdown.Extension): # Custom strikethrough syntax: ~~foo~~ md.inlinePatterns.add('del', markdown.inlinepatterns.SimpleTagPattern( - r'(?strong') + r'(?strong') # Text inside ** must start and end with a word character # it need for things like "const char *x = (char *)y"