aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/html-writer.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/html-writer.js b/lib/html-writer.js
index 1b551ed..be35d52 100644
--- a/lib/html-writer.js
+++ b/lib/html-writer.js
@@ -52,6 +52,11 @@ function prettyWriter() {
writer.text(value.replace("\n", "\n" + indentation));
}
+ function selfClosing(tagName, attributes) {
+ indent();
+ writer.selfClosing(tagName, attributes);
+ }
+
function insideIndentedElement() {
return stack.length === 0 || indentedElements[stack[stack.length - 1]];
}
@@ -70,7 +75,7 @@ function prettyWriter() {
open: open,
close: close,
text: text,
- selfClosing: writer.selfClosing,
+ selfClosing: selfClosing,
append: writer.append
};
}