File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ pub fn get_wrap_state(parent: &AstNodes<'_>) -> WrapState {
7878 AstNodes :: ArrayExpression ( _)
7979 | AstNodes :: JSXAttribute ( _)
8080 | AstNodes :: JSXExpressionContainer ( _)
81- | AstNodes :: Argument ( _)
8281 | AstNodes :: ConditionalExpression ( _) => WrapState :: NoWrap ,
8382 AstNodes :: StaticMemberExpression ( member) => {
8483 if member. optional {
@@ -87,6 +86,9 @@ pub fn get_wrap_state(parent: &AstNodes<'_>) -> WrapState {
8786 WrapState :: WrapOnBreak
8887 }
8988 }
89+ AstNodes :: Argument ( argument) if matches ! ( argument. parent, AstNodes :: CallExpression ( _) ) => {
90+ WrapState :: NoWrap
91+ }
9092 AstNodes :: ExpressionStatement ( stmt) => {
9193 // `() => <div></div>`
9294 // ^^^^^^^^^^^
Original file line number Diff line number Diff line change 1+ return new ImageResponse (
2+ (
3+ < div >
4+ </ div >
5+ ) ,
6+ )
Original file line number Diff line number Diff line change 1+ -- -
2+ source : crates / oxc_formatter / tests / fixtures / mod .rs
3+ -- -
4+ ==================== Input ====================
5+ return new ImageResponse (
6+ (
7+ <div >
8+ </div >
9+ ),
10+ )
11+ ==================== Output ====================
12+ return new ImageResponse (<div ></div >);
13+
14+ ===================== End =====================
You can’t perform that action at this time.
0 commit comments