Merge pull request #303 from erijo/default-template-if
This commit is contained in:
commit
d11e094f7b
1 changed files with 2 additions and 2 deletions
4
yadm
4
yadm
|
@ -411,13 +411,13 @@ function replace_vars() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function conditions() {
|
function conditions() {
|
||||||
pattern = ifs blank "*("
|
pattern = ifs blank "+("
|
||||||
for (label in c) {
|
for (label in c) {
|
||||||
value = c[label]
|
value = c[label]
|
||||||
gsub(/[\\.^$(){}\[\]|*+?]/, "\\\\&", value)
|
gsub(/[\\.^$(){}\[\]|*+?]/, "\\\\&", value)
|
||||||
pattern = sprintf("%syadm\\.%s" blank "*==" blank "*\"%s\"|", pattern, label, value)
|
pattern = sprintf("%syadm\\.%s" blank "*==" blank "*\"%s\"|", pattern, label, value)
|
||||||
}
|
}
|
||||||
sub(/\|$/,")",pattern)
|
sub(/\|$/, ")" blank "*%}$", pattern)
|
||||||
return pattern
|
return pattern
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in a new issue