summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extendedimage.py6
-rw-r--r--strikethrough.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/extendedimage.py b/extendedimage.py
index 27c2668..4babc03 100644
--- a/extendedimage.py
+++ b/extendedimage.py
@@ -13,7 +13,7 @@ from marko import inline
from marko.helpers import MarkoExtension
-class ExtendedImage(inline.InlineElement):
+class ExtendedImageElement(inline.InlineElement):
pattern = r'!\[(.*)\]\(((?:[^"\s\\]|\\.)+|"(?:[^"\\]|\\.)*")\s((?:[^"\s\\]|\\.)+|"(?:[^"\\]|\\.)*")\s((?:[^"\s\\]|\\.)+|"(?:[^"\\]|\\.)*")\s((?:[^"\s\\]|\\.)+|"(?:[^"\\]|\\.)*")\)'
parse_children = True
@@ -33,7 +33,7 @@ class ExtendedImage(inline.InlineElement):
class ExtendedImageRenderer:
- def render_extended_image(self, element):
+ def render_extended_image_element(self, element):
img = f'<img src="{element.src}" title="{element.title}" alt="{element.alt}" />'
if element.href != "":
@@ -46,6 +46,6 @@ class ExtendedImageRenderer:
ExtendedImage = MarkoExtension(
- elements=[ExtendedImage],
+ elements=[ExtendedImageElement],
renderer_mixins=[ExtendedImageRenderer]
)
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]
)