summaryrefslogtreecommitdiff
path: root/strikethrough.py
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2024-07-16 00:16:30 +0200
committerBotond Hende <nettingman@gmail.com>2024-07-16 00:16:30 +0200
commitab7e60b397e5c213e00e85cb942c559deb6cd76c (patch)
treec9670805b4595281db013c582c9045f13c0bb52e /strikethrough.py
parent76de6af40b80575019425607b3a9c2e126aaa332 (diff)
renamed elements so they don't share the name with their extension
Diffstat (limited to 'strikethrough.py')
-rw-r--r--strikethrough.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/strikethrough.py b/strikethrough.py
index d0342fc..9272898 100644
--- a/strikethrough.py
+++ b/strikethrough.py
@@ -8,17 +8,17 @@ from marko import inline
from marko.helpers import MarkoExtension
-class StrikeThrough(inline.InlineElement):
+class StrikeThroughElement(inline.InlineElement):
pattern = '~~(.+)~~'
parse_children = True
class StrikeThroughRenderer:
- def render_strike_through(self, element):
+ def render_strike_through_element(self, element):
return f"<del>{self.render_children(element)}</del>"
StrikeThrough = MarkoExtension(
- elements=[StrikeThrough],
+ elements=[StrikeThroughElement],
renderer_mixins=[StrikeThroughRenderer]
)