diff --git a/pagure/pfmarkdown.py b/pagure/pfmarkdown.py index 57062b4..4308587 100644 --- a/pagure/pfmarkdown.py +++ b/pagure/pfmarkdown.py @@ -54,7 +54,7 @@ COMMIT_LINK_RE = r'(?\w#])([a-f0-9]{7,40})' -STRIKE_THROUGH_RE = r'~~(\w+)~~' +STRIKE_THROUGH_RE = r'~~(.*)~~' class MentionPattern(markdown.inlinepatterns.Pattern): diff --git a/tests/test_pagure_lib.py b/tests/test_pagure_lib.py index 0abb498..63ad1f6 100644 --- a/tests/test_pagure_lib.py +++ b/tests/test_pagure_lib.py @@ -3424,6 +3424,13 @@ class PagureLibtests(tests.Modeltests): 'ircs://pagure.io', 'http://pagure.io', 'https://pagure.io', + '~~foo~~', + '~~foo bar~~', + '~~[BZ#1435310](https://bugzilla.redhat.com/1435310)~~', + "~~[BZ#1435310](https://bugzilla.redhat.com/1435310) avc denial " + "during F26AH boot 'error_name=org.freedesktop.systemd1." + "NoSuchDynamicUser'~~", + '``~~foo bar~~``', ] expected = [ # 'foo bar test#1 see?', @@ -3476,6 +3483,21 @@ class PagureLibtests(tests.Modeltests): '

http://pagure.io

', # 'https://pagure.io' '

https://pagure.io

', + # '~~foo~~' + '

foo

', + # '~~foo bar~~' + '

foo bar

', + # '~~[BZ#1435310](https://bugzilla.redhat.com/1435310)~~' + '

' + 'BZ#1435310

', + # '~~[BZ#1435310](https://bugzilla.redhat.com/1435310) avc + # denial during F26AH boot 'error_name=org.freedesktop.systemd1 + # .NoSuchDynamicUser~~' + "

" + "BZ#1435310 avc denial during F26AH boot 'error_name=" + "org.freedesktop.systemd1.NoSuchDynamicUser'

", + # '``~~foo bar~~``' + '

~~foo bar~~

', ] with pagure.APP.app_context():