From 5f9a53aba207505c7f076aae14cf7704c518a8f6 Mon Sep 17 00:00:00 2001 From: Brad Arant Date: Fri, 20 Nov 2026 02:18:39 +0000 Subject: [PATCH] Fix nested tags hiding a marker right after their close Tag::ifNested(in) returned false after skipping a nested same-name tag (or, for if/while/until/ifrow, a nested one of the others), so both callers also nextChar()ed and skipped the first character after it. A marker right after the nested close was never seen: lost the outer end and swallowed the rest of the content, lost the else, and lost the outer catch, so an error raised inside an inner catch block vanished silently. Return true instead. Tested with the jet CLI (old vs new on 15 cases) and a test server on port 8443: all 87 pages on both sites render the same apart from blank lines, and nested try/catch tests pass on the live site. Co-Authored-By: Claude Opus 5.5 --- Tag.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Tag.cpp b/Tag.cpp index 264db9a..dfab4a9 100644 --- a/Tag.cpp +++ b/Tag.cpp @@ -912,7 +912,12 @@ namespace jet { } if(hasContainer) scanContainer(in); - return false; + // true: the cursor is already past the nested tag. Returning false + // made both callers also nextChar(), skipping the first character + // after it - so a marker right after the nested close (, + // , ) was never seen and the outer tag + // lost its own end or split. + return true; } // Same-name match failed - if THIS tag itself is one of the // splitTagName="else" conditionals (if/while/until/ifrow), a @@ -932,7 +937,7 @@ namespace jet { if(splitTagName == "else") { for(int i = 0; i < elseSplitTagNameCount; i++) { if(ifNested(in, elseSplitTagNames[i])) - break; + return true; } } return false;