tree-sitter-html/corpus/main.txt

90 lines
1.6 KiB
Plaintext

===================================
Tags
===================================
<span>Hello</span>
---
(fragment
(element
(start_tag)
(text)
(end_tag)))
===================================
Tags with attributes
===================================
<input value=yes class="a" data-💩></input>
---
(fragment
(element
(start_tag
(attribute
(attribute_name)
(attribute_value))
(attribute
(attribute_name)
(quoted_attribute_value (attribute_value)))
(attribute
(attribute_name)))
(end_tag)))
===================================
Nested tags
===================================
<div>
<span>a</span>
b
<b>c</b>
</div>
---
(fragment
(element
(start_tag)
(element
(start_tag)
(text)
(end_tag))
(text)
(element
(start_tag)
(text)
(end_tag))
(end_tag)))
==================================
Void tags
==================================
<form><img src="something.png"><br><input type=submit value=Ok /></form>
---
(fragment
(element
(start_tag)
(element
(start_tag
(attribute (attribute_name) (quoted_attribute_value (attribute_value)))))
(element (start_tag))
(element
(self_closing_tag
(attribute (attribute_name) (attribute_value))
(attribute (attribute_name) (attribute_value))))
(end_tag)))
==================================
Comments
==================================
<!-- hello -->
<div>
<!-- <span>something</span> -->
</div>
---
(fragment
(comment)
(element
(start_tag)
(comment)
(end_tag)))