We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1264c9 commit c9fb1aaCopy full SHA for c9fb1aa
README.md
@@ -36,7 +36,7 @@ From the CLI:
36
37
```sh
38
$ stree ast template.haml
39
-(root children=[(tag attributes={} value="Hello, world!")])
+(root children=[(tag name="span" value="Hello, world!")])
40
```
41
42
or
lib/syntax_tree/haml/tag.rb
@@ -233,8 +233,14 @@ def format(q)
233
def pretty_print(q)
234
q.group(2, "(tag", ")") do
235
q.breakable
236
- q.text("attributes=")
237
- q.pp(node.value[:attributes])
+ q.text("name=")
+ q.pp(node.value[:name])
238
+
239
+ if node.value[:attributes].any?
240
+ q.breakable
241
+ q.text("attributes=")
242
+ q.pp(node.value[:attributes])
243
+ end
244
245
if node.value[:dynamic_attributes].new
246
0 commit comments