diff --git a/src/moin/converters/_tests/test_moinwiki_in.py b/src/moin/converters/_tests/test_moinwiki_in.py index 511a30399..a4dad6f01 100644 --- a/src/moin/converters/_tests/test_moinwiki_in.py +++ b/src/moin/converters/_tests/test_moinwiki_in.py @@ -176,6 +176,10 @@ def test_inline(self, input, output): " * Item", 'Item', ), + ( + " . Item", + 'Item', + ), ( " 1. Item", 'Item', @@ -212,6 +216,10 @@ def test_inline(self, input, output): " * List 1\n 1. List 2", 'List 1List 2', ), + ( + " * --(A::B)--", + 'A::B', + ), ] @pytest.mark.parametrize("input,output", data) diff --git a/src/moin/converters/moinwiki_in.py b/src/moin/converters/moinwiki_in.py index b6519f413..b21f43b07 100644 --- a/src/moin/converters/moinwiki_in.py +++ b/src/moin/converters/moinwiki_in.py @@ -374,10 +374,10 @@ def block_text_repl(self, _iter_content, stack, text): ^ (?P \s* ) (?P - (?P - (?P .*? ) - :: - ) + (?P \* ) + \s* + | + (?P \. ) \s* | (?P [0-9]+\. (\#(?P[0-9]+))?) @@ -389,10 +389,10 @@ def block_text_repl(self, _iter_content, stack, text): (?P [iI]\. (\#(?P[0-9]+))?) \s+ | - (?P \* ) - \s* - | - (?P \. ) + (?P + (?P .*? ) + :: + ) \s* )? (?P .*? ) @@ -650,6 +650,8 @@ def inline_strike_repl(self, stack, strike, strike_begin=None): """Ignore the closing stroke tag if no opening tag found""" if strike_begin is not None: stack.push(moin_page.del_()) + elif strike == ")--" and stack and stack.top_check("del"): + stack.pop() inline_subscript = r""" (?P