From 6cfe01ed10e4c214fcf2ceec7704b4bfd52f4834 Mon Sep 17 00:00:00 2001 From: "matthias@quintern.xyz" Date: Tue, 3 Dec 2024 17:03:05 +0100 Subject: [PATCH] use exact argument name for section --- html-preprocessor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html-preprocessor b/html-preprocessor index 86e68c9..16525ba 100755 --- a/html-preprocessor +++ b/html-preprocessor @@ -367,7 +367,7 @@ def cmd_include(args: str, variables:dict[str, str]={}) -> str: cmd_args = match.groups()[1].replace('\t', ' ').strip(' ') pdebug("cmd_include", f"Found command '{command}' with args '{cmd_args}'") if command == "section": - if cmd_args.startswith(target_section): + if cmd_args == target_section: p.pos["start"] = max(p.pos["cmt_end"] + len(COMMENT_END), p.pos["line_end"] + 1) elif p.pos["start"] >= 0: #end p.pos["end"] = max(p.pos["cmt_end"] + len(COMMENT_END), p.pos["line_end"] + 1)