docs(ast): correct JSXExpressionContainer example (#26975)

This commit is contained in:
camc314 committed 2026-09-23 16:09:30 +00:00
1 parent 8cb05e3ecc
commit cd80e3f10d
1 file changed
+7 -5
+7 -5
View File
@@ -272,11 +272,13 @@ pub enum JSXMemberExpressionObject<'a> {
/// ## Example
///
/// ```tsx
/// // boolean-like and string-like expressions are not wrapped in containers.
/// // Here, only `container` is a JSXExpressionContainer.
/// <Foo bar baz="bang" container={4}/>
/// {4} // <- wrapped in container
/// </Foo>
/// // `bar` has no value; `baz` has a StringLiteral value.
/// // Both `{4}` parts are JSXExpressionContainer nodes.
/// const element = (
/// <Foo bar baz="bang" container={4}>
/// {4}
/// </Foo>
/// );
/// ```
#[ast(visit)]
#[derive(Debug)]