diff --git a/notifications_utils/formatters.py b/notifications_utils/formatters.py index 71959cda..90b43790 100644 --- a/notifications_utils/formatters.py +++ b/notifications_utils/formatters.py @@ -417,7 +417,7 @@ def list(self, body, ordered=True): '' "" '" @@ -429,7 +429,7 @@ def list(self, body, ordered=True): '
' - '
    ' + '
      ' "{}" "
    " "
' "" '" @@ -440,8 +440,8 @@ def list(self, body, ordered=True): def list_item(self, text): return ( - '
  • ' + '
  • ' "{}" "
  • " ).format(text.strip()) diff --git a/tests/test_formatters.py b/tests/test_formatters.py index 648bd6ff..a3bfedd3 100644 --- a/tests/test_formatters.py +++ b/tests/test_formatters.py @@ -351,13 +351,10 @@ def test_hrule(markdown_function, expected): '
    ' - '
      ' + '
        ' "{}" "
      " "
    ' "" '" "" @@ -414,13 +411,10 @@ def test_ordered_list(markdown_function, markdown_input, expected): '
    ' - '
      ' - '
    1. one
    2. ' - '
    3. two
    4. ' - '
    5. three
    6. ' + '
        ' + '
      1. one
      2. ' + '
      3. two
      4. ' + '
      5. three
      6. ' "
      " "
    ' "" '" "" @@ -506,8 +500,8 @@ def test_pluses_dont_render_as_lists(markdown_function, expected): "* **title**: description", '
    ' - '
      ' - '
    • one
    • ' - '
    • two
    • ' - '
    • three
    • ' + '
        ' + '
      • one
      • ' + '
      • two
      • ' + '
      • three
      • ' "
      " "
    ' '
    ' - '
      ' - '
    • ' + '
        ' + '
      • ' "title: description
    ", ], ), @@ -1065,7 +1059,7 @@ class TestAddLanguageDivs: 1. item 2 1. item 3 [[/fr]]""", - f'
    {EMAIL_P_OPEN_TAG}Le français suis l\'anglais{EMAIL_P_CLOSE_TAG}
    • item 1
    • item 2
    • item 3
    {EMAIL_P_OPEN_TAG}bonjour{EMAIL_P_CLOSE_TAG}
    1. item 1
    2. item 2
    3. item 3
    ', # noqa + f'
    {EMAIL_P_OPEN_TAG}Le français suis l\'anglais{EMAIL_P_CLOSE_TAG}
    • item 1
    • item 2
    • item 3
    {EMAIL_P_OPEN_TAG}bonjour{EMAIL_P_CLOSE_TAG}
    1. item 1
    2. item 2
    3. item 3
    ', # noqa ), ("[[en]]No closing tag", f"{EMAIL_P_OPEN_TAG}[[en]]No closing tag{EMAIL_P_CLOSE_TAG}"), ("No opening tag[[/en]]", f"{EMAIL_P_OPEN_TAG}No opening tag[[/en]]{EMAIL_P_CLOSE_TAG}"),