Marko v3: Expose convenience method for getting a reference to the escapeXmlAttr helper

This commit is contained in:
Patrick Steele-Idem 2016-02-06 18:17:27 -07:00
parent 396c9794f3
commit d60d82ddc5
2 changed files with 8 additions and 0 deletions

View File

@ -146,6 +146,10 @@ class Generator {
this.context.addStaticCode(code);
}
getEscapeXmlAttrVar() {
return this.context.getEscapeXmlAttrVar();
}
importModule(varName, path) {
return this.context.importModule(varName, path);
}

View File

@ -168,6 +168,10 @@ class CompileContext {
return this._staticCode;
}
getEscapeXmlAttrVar() {
return this.addStaticVar('escapeXmlAttr', '__helpers.xa');
}
getTagDef(tagName) {
var taglibLookup = this.taglibLookup;