Skip to content

Commit

Permalink
add test for an script tag with async
Browse files Browse the repository at this point in the history
  • Loading branch information
vrischmann committed Jan 27, 2025
1 parent a9178bf commit 683b55a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/corpus/script.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,33 @@ templ Foobar() {
name: (attribute_name)
value: (quoted_attribute_value
(attribute_value)))))))

===
Async script element
===

package main

templ Foobar() {
<script data-goatcounter="https://vrischmann.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
}

---

(source_file
(package_clause
(package_identifier))
(component_declaration
name: (component_identifier)
(parameter_list)
(component_block
(script_element
(attribute
name: (attribute_name)
value: (quoted_attribute_value
(attribute_value)))
(attribute
name: (attribute_name)
value: (quoted_attribute_value
(attribute_value)))
(script_element_text)))))

0 comments on commit 683b55a

Please sign in to comment.