summaryrefslogtreecommitdiff
path: root/extendedimage.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 /extendedimage.py
parent76de6af40b80575019425607b3a9c2e126aaa332 (diff)
renamed elements so they don't share the name with their extension
Diffstat (limited to 'extendedimage.py')
-rw-r--r--extendedimage.py6
1 files changed, 3 insertions, 3 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]
)