We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cff90ee commit 61b5564Copy full SHA for 61b5564
crates/djls-ast/src/parser.rs
@@ -557,6 +557,15 @@ mod tests {
557
insta::assert_yaml_snapshot!(ast);
558
}
559
560
+ #[test]
561
+ fn test_parse_html_void() {
562
+ let source = r#"<img src="example.png" />"#;
563
+ let tokens = Lexer::new(source).tokenize().unwrap();
564
+ let mut parser = Parser::new(tokens);
565
+ let ast = parser.parse().unwrap();
566
+ insta::assert_yaml_snapshot!(ast);
567
+ }
568
+
569
#[test]
570
fn test_parse_script() {
571
let source = r#"<script type="text/javascript">
crates/djls-ast/src/snapshots/djls_ast__parser__tests__parse_html_void.snap
@@ -0,0 +1,11 @@
1
+---
2
+source: crates/djls-ast/src/parser.rs
3
+expression: ast
4
5
+nodes:
6
+ - Html:
7
+ Void:
8
+ tag_name: img
9
+ attributes:
10
+ src:
11
+ Value: example.png
0 commit comments