Fixed ability to not have to enclose jet tag.
This commit is contained in:
parent
169ad1aa11
commit
0de087f14d
2
Tag.cpp
2
Tag.cpp
@ -31,7 +31,7 @@ namespace jet {
|
|||||||
Tag::Tag(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, coreutils::ZString splitTagName)
|
Tag::Tag(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, coreutils::ZString splitTagName)
|
||||||
: ZString(in), parentOut(parentOut), global(global), parent(parent) {
|
: ZString(in), parentOut(parentOut), global(global), parent(parent) {
|
||||||
this->splitTagName = splitTagName;
|
this->splitTagName = splitTagName;
|
||||||
if(in.ifNext("<")) {
|
if(parent && in.ifNext("<")) {
|
||||||
name = in.getTokenInclude("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_!");
|
name = in.getTokenInclude("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_!");
|
||||||
if(in.startsWith(" ") || in.startsWith("/") || in.startsWith(">")) {
|
if(in.startsWith(" ") || in.startsWith("/") || in.startsWith(">")) {
|
||||||
bool finished = false;
|
bool finished = false;
|
||||||
|
3
Tag.h
3
Tag.h
@ -11,7 +11,7 @@ namespace jet {
|
|||||||
class Tag : public coreutils::ZString {
|
class Tag : public coreutils::ZString {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Tag(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent, coreutils::ZString splitTagName = "");
|
Tag(coreutils::ZString &in, coreutils::MString &parentOut, Global &global, Tag *parent = NULL, coreutils::ZString splitTagName = "");
|
||||||
virtual ~Tag();
|
virtual ~Tag();
|
||||||
|
|
||||||
std::map<coreutils::ZString, coreutils::MString> variables;
|
std::map<coreutils::ZString, coreutils::MString> variables;
|
||||||
@ -40,6 +40,7 @@ namespace jet {
|
|||||||
bool cleanWhitespace = false;
|
bool cleanWhitespace = false;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool containerOnly = false;
|
||||||
coreutils::ZString splitTagName;
|
coreutils::ZString splitTagName;
|
||||||
|
|
||||||
int skipBlankLine(coreutils::ZString in);
|
int skipBlankLine(coreutils::ZString in);
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
#!../jet-2.0
|
#!../jet-2.0
|
||||||
<jet filterblanklines="true" trimlines="true">
|
|
||||||
|
|
||||||
<set name="ix" value="1" />
|
<set name="ix" value="1" />
|
||||||
<set name="letterx" value="x" />
|
<set name="letterx" value="x" />
|
||||||
<set name="var1" value="this is a test" />
|
<set name="var1" value="this is a test" />
|
||||||
<set name="1var1" value="This is another test" />
|
<set name="1var1" value="This is another test" />
|
||||||
<set name="var1var" value="Yet another test" />
|
<set name="var1var" value="Yet another test" />
|
||||||
<set name="var11" value="it seems to work." />
|
<set name="var11" value="it seems to work." />
|
||||||
$[$test]
|
|
||||||
$[$[ix]var$[ix]]
|
$[$[ix]var$[ix]]
|
||||||
$[var$[ix]]
|
$[var$[ix]]
|
||||||
$[var$[ix]var]
|
$[var$[ix]var]
|
||||||
@ -14,4 +15,4 @@ $[var$[i$[letterx]]var]
|
|||||||
$[letterx;TOHEX]
|
$[letterx;TOHEX]
|
||||||
$[var$[i$[letterx]]$[ix]]
|
$[var$[i$[letterx]]$[ix]]
|
||||||
$[var$[i$[letterx]]$[i$[letterx]]]
|
$[var$[i$[letterx]]$[i$[letterx]]]
|
||||||
</jet>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user