Skip to content

Commit ce33f68

Browse files
committed
more alignment
1 parent 865c27f commit ce33f68

40 files changed

+2217
-656
lines changed

crates/oxc_angular_compiler/src/ast/html.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ pub struct HtmlElement<'a> {
110110
pub end_span: Option<Span>,
111111
/// Whether this element was explicitly self-closing (e.g., `<div/>`).
112112
pub is_self_closing: bool,
113+
/// Whether this is a void element (area, base, br, col, embed, hr, img, input, link, meta, param, source, track, wbr).
114+
/// Void elements cannot have content and do not have end tags.
115+
pub is_void: bool,
113116
}
114117

115118
/// A selectorless directive in the HTML AST (e.g., @Dir or @Dir(attr="value")).
@@ -455,6 +458,7 @@ mod tests {
455458
start_span: Span::default(),
456459
end_span: None,
457460
is_self_closing: false,
461+
is_void: false,
458462
};
459463

460464
let child2 = HtmlElement {
@@ -466,6 +470,7 @@ mod tests {
466470
start_span: Span::default(),
467471
end_span: None,
468472
is_self_closing: false,
473+
is_void: false,
469474
};
470475

471476
let mut children = Vec::new_in(&allocator);
@@ -481,6 +486,7 @@ mod tests {
481486
start_span: Span::default(),
482487
end_span: None,
483488
is_self_closing: false,
489+
is_void: false,
484490
};
485491

486492
let mut nodes = Vec::new_in(&allocator);

0 commit comments

Comments
 (0)