aboutsummaryrefslogtreecommitdiff
path: root/lib/html-generator.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/html-generator.js')
-rw-r--r--lib/html-generator.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/html-generator.js b/lib/html-generator.js
index 6a8fb32..fd6aac7 100644
--- a/lib/html-generator.js
+++ b/lib/html-generator.js
@@ -39,10 +39,10 @@ function HtmlGenerator() {
partIndex++;
}
while (stack.length > partIndex) {
- pop();
+ close();
}
for (; partIndex < style.length; partIndex++) {
- push(style[partIndex]);
+ open(style[partIndex]);
}
}
@@ -50,23 +50,23 @@ function HtmlGenerator() {
return stackElement && stylePart.tagName === stackElement.element.tagName;
}
- function push(element) {
+ function open(element) {
stack.push({
element: element,
written: false
});
}
- function pop() {
+ function close() {
var stackElement = stack.pop();
if (stackElement.written) {
fragments.push(util.format("</%s>", stackElement.element.tagName));
}
}
- function popAll() {
+ function closeAll() {
while (stack.length > 0) {
- pop();
+ close();
}
}
@@ -97,11 +97,11 @@ function HtmlGenerator() {
return {
style: style,
text: text,
- closeAll: popAll,
+ open: open,
+ close: close,
+ closeAll: closeAll,
asString: asString,
append: append,
- push: push,
- pop: pop,
selfClosing: selfClosing,
_fragments: fragments
};