Clean up the transparent markers function.

This commit is contained in:
brad Arant 2025-10-20 16:22:22 -07:00
parent 7b6342b8d7
commit 280d4b8aa2
3 changed files with 10 additions and 9 deletions

12
Tag.cpp
View File

@ -126,24 +126,26 @@ namespace jet {
return resolved; return resolved;
} }
void Tag::processContainer(coreutils::ZString &container, coreutils::ZString container2) { void Tag::processContainer(coreutils::ZString &container, coreutils::ZString container2, bool topLevel) {
if(hasContainer && evaluate) if(hasContainer && evaluate)
parseContainer(container, out, container2); parseContainer(container, out, container2, topLevel);
} }
void Tag::parseContainer(coreutils::ZString &in, coreutils::MString &out, coreutils::ZString container2) { void Tag::parseContainer(coreutils::ZString &in, coreutils::MString &out, coreutils::ZString container2, bool topLevel) {
coreutils::ZString tag; coreutils::ZString tag;
char *start = in.getCursor(); char *start = in.getCursor();
while(!in.eod()) { while(!in.eod()) {
if(in.ifNext("|>")) { if(in.ifNext("|>")) {
out.write("|>"); if(!topLevel)
out.write("|>");
char ch = in.nextChar(); char ch = in.nextChar();
while(!in.ifNext("<|")) { while(!in.ifNext("<|")) {
out.write(ch); out.write(ch);
ch = in.nextChar(); ch = in.nextChar();
} }
out.write(ch); out.write(ch);
out.write("<|"); if(!topLevel)
out.write("<|");
continue; continue;
} else if(in.startsWith("<")) { } else if(in.startsWith("<")) {
if(ifTagName(in, "mysql")) { if(ifTagName(in, "mysql")) {

4
Tag.h
View File

@ -30,8 +30,8 @@ namespace jet {
bool hasContainer = false; bool hasContainer = false;
bool hasContainer2 = false; bool hasContainer2 = false;
bool keywordDefined(coreutils::ZString variable); bool keywordDefined(coreutils::ZString variable);
void parseContainer(coreutils::ZString &in, coreutils::MString &out, coreutils::ZString container2 = NULL); void parseContainer(coreutils::ZString &in, coreutils::MString &out, coreutils::ZString container2 = NULL, bool topLevel = false);
void processContainer(coreutils::ZString &container, coreutils::ZString container2 = NULL); void processContainer(coreutils::ZString &container, coreutils::ZString container2 = NULL, bool topLevel = false);
void copyContainer(coreutils::ZString &in, coreutils::MString &out); void copyContainer(coreutils::ZString &in, coreutils::MString &out);
coreutils::MString &parentOut; coreutils::MString &parentOut;

View File

@ -43,7 +43,6 @@ namespace jet {
// global.setupFormURLEncoded(postdata); // global.setupFormURLEncoded(postdata);
} }
} }
processContainer(container); processContainer(container, NULL, true);
} }
} }