From b0f4ad71d0a644fc7a80bea3acf10009761f0a15 Mon Sep 17 00:00:00 2001 From: Greenscreener Date: Sun, 20 Aug 2023 00:24:23 +0200 Subject: [PATCH] =?UTF-8?q?Odstran=C4=9Bny=20zbytky=20passov=C3=A1n=C3=AD?= =?UTF-8?q?=20atribut=C5=AF=20manu=C3=A1ln=C4=9B,=20n=C4=9Bkde=20=C3=BAmys?= =?UTF-8?q?ln=C4=9B=20zanech=C3=A1no.=20Resolves=20#26?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/formatitko/transform_processor.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/formatitko/transform_processor.py b/src/formatitko/transform_processor.py index 998e6a9..2256aa4 100644 --- a/src/formatitko/transform_processor.py +++ b/src/formatitko/transform_processor.py @@ -341,11 +341,7 @@ class TransformProcessor: def transform_Image(self, e: Image) -> Image: e.content = self.transform(e.content) - # FIXME? Passing down attributes explicitly no longer needed, because OG now has access to Context. - # Pass down the directory of the current source file for finding image - # files. - e.attributes["source_dir"] = self.context.dir - # FIXME? Passing down attributes explicitly no longer needed, because OG now has access to Context. + # OG now has Context so this is not needed per se, but I'm keeping this here for the handling of attribute > context > default value # Pass down "no-srcset" metadatum as attribute down to images. if not "no-srcset" in e.attributes: e.attributes["no-srcset"] = self.context.get_metadata("no-srcset") if self.context.get_metadata("no-srcset") is not None else False @@ -470,7 +466,7 @@ class TransformProcessor: # Pass down metadata 'highlight' and 'highlight_style' as attribute to CodeBlocks - # FIXME? Passing down attributes explicitly no longer needed, because OG now has access to Context. + # OG now has Context so this is not needed per se, but I'm keeping this here for the handling of attribute > context > default value if not "highlight" in e.attributes: e.attributes["highlight"] = self.context.get_metadata("highlight") if self.context.get_metadata("highlight") is not None else True if not "style" in e.attributes: