From c11d5abcd06a5a944232f008f5a9ce3c4a5f35c0 Mon Sep 17 00:00:00 2001 From: Brad Arant Date: Thu, 16 Jan 2025 15:45:15 -0800 Subject: [PATCH] Fixed some bugs in include and jet tags for cgi handling. --- __include.cpp | 2 +- __jet.cpp | 2 +- tests/dump.txt | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/__include.cpp b/__include.cpp index dae4ab4..99ca5c1 100644 --- a/__include.cpp +++ b/__include.cpp @@ -10,7 +10,7 @@ namespace jet { if(hasContainer) throw coreutils::Exception("include tag should not have a container."); hasContainer = true; - coreutils::File file(keywords[resolveKeyword("file")]); + coreutils::File file(resolveKeyword("file")); file.read(); container = file.asZString(); try { diff --git a/__jet.cpp b/__jet.cpp index c65fbf7..60b789e 100644 --- a/__jet.cpp +++ b/__jet.cpp @@ -6,7 +6,7 @@ namespace jet { __jet::__jet(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, Tag *local) : Tag(in, parentOut, global, parent, this) { - if(keywordDefined("cgi") && (keywords[resolveKeyword("cgi")] == "true")) { + if(keywordDefined("cgi") && (resolveKeyword("cgi") == "true")) { global.cgi = true; if(keywordDefined("sessiondir")) { diff --git a/tests/dump.txt b/tests/dump.txt index 9498a30..971245e 100644 --- a/tests/dump.txt +++ b/tests/dump.txt @@ -24,3 +24,6 @@ varname1=[vardata] *** LOCAL VARIABLES *** localvar=[This is a container set with ''] testinclude=[xThis is a container set with ''x] +*** KEYWORD VALUES *** +file=[./testinclude.jet] +name1=[]