From 3b683fb7d5104ced347382b63057ac080c90a63e Mon Sep 17 00:00:00 2001 From: "Sup#2.0" <102817779+Sup2point0@users.noreply.github.com> Date: Tue, 2 Apr 2024 10:25:23 +0100 Subject: [PATCH] add support for multiple styles --- quarkdown/quarkify.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/quarkdown/quarkify.py b/quarkdown/quarkify.py index afcfefd..433e81e 100644 --- a/quarkdown/quarkify.py +++ b/quarkdown/quarkify.py @@ -35,12 +35,17 @@ def export(file: ContentFile) -> dict: content = textualise.render_html(content) content = textualise.clear_comments(content) + style = "\n".join( + f'''''' + for style in load.get("style", ["default"]) + ) + root = os.path.split(os.path.abspath(__file__))[0] path = os.path.join(root, "resources/core.html") with open(path) as source: content = source.read().format( - style = load.get("style", ["default"])[0], # TODO support multiple styles + style = style, darkness = load.get("polarity", "light") == "dark", header = load.get("header", ""), content = content,