From 8c713d206d856b064ffed15835773bf2811f3a36 Mon Sep 17 00:00:00 2001 From: crossdark Date: Thu, 29 Aug 2024 12:39:59 +0800 Subject: [PATCH] =?UTF-8?q?V0.1.1=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CrossDown.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/CrossDown.py b/CrossDown.py index bc0f991..a1795df 100644 --- a/CrossDown.py +++ b/CrossDown.py @@ -136,6 +136,9 @@ class CodeBlock: def __call__(self, *args, **kwargs): return re.sub(r'`[^`]*`', '', self.text) + def restore(self): + pass + class Basic: @staticmethod @@ -184,15 +187,7 @@ def main(origen: str): if __name__ == '__main__': with open('test.md', encoding='utf-8') as test: - cd = f""" - - - 页面标题 - - - {main(test.read())} - -""" + cd = main(test.read()) with open('test.html', 'w', encoding='utf-8') as html: html.write(f""" @@ -206,4 +201,4 @@ if __name__ == '__main__': {add_indent_to_string(cd, 4)} - """) +""")