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: </if></if> lost the outer end and swallowed the rest of the content, </if><else> lost the else, and </try><catch> 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 <noreply@anthropic.com>
This commit is contained in:
1 parent
fdcb2b43a9
commit
5f9a53aba2
1 file changed
+7
-2
@@ -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 (</if></if>,
|
||||
// </if><else>, </try><catch>) 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;
|
||||
|
||||
Reference in new issue
Block a user