From 25213f0390cda74e1b62411705c36dd7f46a44bd Mon Sep 17 00:00:00 2001 From: "Sup#2.0" <102817779+Sup2point0@users.noreply.github.com> Date: Mon, 8 Apr 2024 19:31:29 +0100 Subject: [PATCH] fix quarkless detection --- quarkdown/quarkify.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quarkdown/quarkify.py b/quarkdown/quarkify.py index 308d9df..d41dcb9 100644 --- a/quarkdown/quarkify.py +++ b/quarkdown/quarkify.py @@ -84,7 +84,8 @@ def extract_quarks(text: str) -> dict: # TODO splitting twice is really, really slow, how do we optimise this for idx, line in enumerate(text.split("\n")): if idx < LIVE_LINES: - if flags.get("live", False) is False: + # once we reach LIVE_LINES, we force quit if we haven’t seen `#QUARK live!` + if flags.get("live", idx != LIVE_LINES) is False: raise Quarkless("#QUARK file inactive") for part in line.split():