Skip to content

Commit

Permalink
fancylist inject class remove semicolon (#2464)
Browse files Browse the repository at this point in the history
  • Loading branch information
joapuiib authored Sep 22, 2024
1 parent 8443104 commit dee67da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pymdownx/fancylists.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_extensions/test_fancylists.py
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ def test_inject_class(self):
i. Item i
''',
R'''
<ol class="fancylists-lower-roman;" type="i">
<ol class="fancylists-lower-roman" type="i">
<li>Item i</li>
</ol>
''',
Expand All @@ -1047,7 +1047,7 @@ def test_inject_class_force(self):
///
''',
R'''
<ol class="fancylists-lower-roman;" start="5" type="i">
<ol class="fancylists-lower-roman" start="5" type="i">
<li>Item v</li>
</ol>
''',
Expand Down

0 comments on commit dee67da

Please sign in to comment.