aboutsummaryrefslogtreecommitdiff
path: root/formatter/formatter.go
diff options
context:
space:
mode:
Diffstat (limited to 'formatter/formatter.go')
-rw-r--r--formatter/formatter.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/formatter/formatter.go b/formatter/formatter.go
index 157b0ab..af84ec3 100644
--- a/formatter/formatter.go
+++ b/formatter/formatter.go
@@ -42,6 +42,8 @@ func PrintAst(ast parser.AstNode) {
}
case parser.Tagless:
printChildren(ast.Children)
+ case parser.TaglessTrim:
+ printChildrenTrim(ast.Children)
}
}
@@ -93,6 +95,12 @@ func printText(s string) {
}
func printChildren(nodes []parser.AstNode) {
+ for _, n := range nodes {
+ PrintAst(n)
+ }
+}
+
+func printChildrenTrim(nodes []parser.AstNode) {
for i, n := range nodes {
if i == 0 && n.Type == parser.Text {
n.Text = trimLeftSpaces(n.Text)