diff --git a/pymdownx/fancylists.py b/pymdownx/fancylists.py index cfc1cb864..79e7e0791 100644 --- a/pymdownx/fancylists.py +++ b/pymdownx/fancylists.py @@ -215,7 +215,7 @@ def run(self, parent, blocks): if self.inject_style: attrib['style'] = f"list-style-type: {OL_STYLE[attrib['type']]};" if self.inject_class: - attrib['class'] = f"fancylists-{OL_STYLE[attrib['type']]};" + attrib['class'] = f"fancylists-{OL_STYLE[attrib['type']]}" lst = etree.SubElement( parent, self.TAG, @@ -454,7 +454,7 @@ def on_create(self, parent): if self.inject_style: attrib['style'] = f"list-style-type: {OL_STYLE[self.type]};" if self.inject_class: - attrib['class'] = f"fancylists-{OL_STYLE[self.type]};" + attrib['class'] = f"fancylists-{OL_STYLE[self.type]}" self.parent = parent self.ol = etree.SubElement(parent, 'ol', attrib) diff --git a/tests/test_extensions/test_fancylists.py b/tests/test_extensions/test_fancylists.py index 47f2ef65d..f50cd4fa0 100644 --- a/tests/test_extensions/test_fancylists.py +++ b/tests/test_extensions/test_fancylists.py @@ -1030,7 +1030,7 @@ def test_inject_class(self): i. Item i ''', R''' -
    +
    1. Item i
    ''', @@ -1047,7 +1047,7 @@ def test_inject_class_force(self): /// ''', R''' -
      +
      1. Item v
      ''',