From ab7e60b397e5c213e00e85cb942c559deb6cd76c Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Tue, 16 Jul 2024 00:16:30 +0200 Subject: renamed elements so they don't share the name with their extension --- extendedimage.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'extendedimage.py') 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'{element.alt}' if element.href != "": @@ -46,6 +46,6 @@ class ExtendedImageRenderer: ExtendedImage = MarkoExtension( - elements=[ExtendedImage], + elements=[ExtendedImageElement], renderer_mixins=[ExtendedImageRenderer] ) -- cgit v1.2.3-70-g09d2