docs(ast): correct JSXText example (#26970)

This commit is contained in:
camc314 committed 2026-09-23 14:32:32 +00:00
1 parent 3471f2944c
commit 278288e1e9
1 file changed
+6 -2
+6 -2
View File
@@ -520,8 +520,12 @@ pub struct JSXSpreadChild<'a> {
/// ## Example
///
/// ```tsx
/// <Foo>Some text</Foo> // `Some Text` is a JSXText,
/// <Foo>"Some string"</Foo> // but `"Some string"` is a StringLiteral.
/// // Both children are JSXText, including the quotation marks:
/// const plain = <Foo>Some text</Foo>;
/// const quoted = <Foo>"Some string"</Foo>;
///
/// // The expression container contains a StringLiteral:
/// const expression = <Foo>{"Some string"}</Foo>;
/// ```
#[ast(visit)]
#[derive(Debug)]