Clean up the transparent markers function.
This commit is contained in:
parent
7b6342b8d7
commit
280d4b8aa2
12
Tag.cpp
12
Tag.cpp
@ -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
4
Tag.h
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user