@@ -23,6 +23,7 @@ import {
23
23
StyleDirectiveNode ,
24
24
ASTNode ,
25
25
CommentInfo ,
26
+ SvelteBoundary ,
26
27
} from './nodes' ;
27
28
import { blockElements , TagName } from '../lib/elements' ;
28
29
import { FastPath } from 'prettier' ;
@@ -31,7 +32,11 @@ import { ParserOptions, isBracketSameLine } from '../options';
31
32
32
33
const unsupportedLanguages = [ 'coffee' , 'coffeescript' , 'styl' , 'stylus' , 'sass' ] ;
33
34
34
- export function isInlineElement ( path : FastPath , options : ParserOptions , node : Node ) {
35
+ export function isInlineElement (
36
+ path : FastPath ,
37
+ options : ParserOptions ,
38
+ node : Node ,
39
+ ) : node is ElementNode {
35
40
return (
36
41
node && node . type === 'Element' && ! isBlockElement ( node , options ) && ! isPreTagContent ( path )
37
42
) ;
@@ -180,6 +185,7 @@ export function printRaw(
180
185
| WindowNode
181
186
| HeadNode
182
187
| TitleNode
188
+ | SvelteBoundary
183
189
| SlotTemplateNode ,
184
190
originalText : string ,
185
191
stripLeadingAndTrailingNewline : boolean = false ,
@@ -400,6 +406,10 @@ export function shouldHugStart(
400
406
return true ;
401
407
}
402
408
409
+ if ( node . type === 'SvelteBoundary' ) {
410
+ return false ;
411
+ }
412
+
403
413
if ( isBlockElement ( node , options ) ) {
404
414
return false ;
405
415
}
@@ -434,6 +444,10 @@ export function shouldHugEnd(
434
444
return true ;
435
445
}
436
446
447
+ if ( node . type === 'SvelteBoundary' ) {
448
+ return false ;
449
+ }
450
+
437
451
if ( isBlockElement ( node , options ) ) {
438
452
return false ;
439
453
}
0 commit comments