V0.1.1修正

This commit is contained in:
跨越晨昏 2024-08-29 12:39:59 +08:00
parent fd82afdaa4
commit 8c713d206d

View File

@ -136,6 +136,9 @@ class CodeBlock:
def __call__(self, *args, **kwargs): def __call__(self, *args, **kwargs):
return re.sub(r'`[^`]*`', '', self.text) return re.sub(r'`[^`]*`', '', self.text)
def restore(self):
pass
class Basic: class Basic:
@staticmethod @staticmethod
@ -184,15 +187,7 @@ def main(origen: str):
if __name__ == '__main__': if __name__ == '__main__':
with open('test.md', encoding='utf-8') as test: with open('test.md', encoding='utf-8') as test:
cd = f"""<!DOCTYPE html> cd = main(test.read())
<html>
<head>
<title>页面标题</title>
</head>
<body>
{main(test.read())}
</body>
</html>"""
with open('test.html', 'w', encoding='utf-8') as html: with open('test.html', 'w', encoding='utf-8') as html:
html.write(f"""<!DOCTYPE html> html.write(f"""<!DOCTYPE html>
<html lang="zh-CN"> <html lang="zh-CN">