diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-04-08 20:56:47 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-04-08 20:56:47 +0100 |
| commit | 03716aafae79ce637bd130b006faac3ffd42499d (patch) | |
| tree | fcce77f79b4bbdc12769e2532dae69a17c7e6d73 /lib/html-generator.js | |
| parent | 0695263132193745d7f543fb1a20b63dbfe00075 (diff) | |
Use open/close names rather than push/pop for HtmlGenerator
Diffstat (limited to 'lib/html-generator.js')
| -rw-r--r-- | lib/html-generator.js | 18 |
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 }; |
