@@ -23,6 +23,7 @@ import {
2323 StyleDirectiveNode ,
2424 ASTNode ,
2525 CommentInfo ,
26+ SvelteBoundary ,
2627} from './nodes' ;
2728import { blockElements , TagName } from '../lib/elements' ;
2829import { FastPath } from 'prettier' ;
@@ -31,7 +32,11 @@ import { ParserOptions, isBracketSameLine } from '../options';
3132
3233const unsupportedLanguages = [ 'coffee' , 'coffeescript' , 'styl' , 'stylus' , 'sass' ] ;
3334
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 {
3540 return (
3641 node && node . type === 'Element' && ! isBlockElement ( node , options ) && ! isPreTagContent ( path )
3742 ) ;
@@ -180,6 +185,7 @@ export function printRaw(
180185 | WindowNode
181186 | HeadNode
182187 | TitleNode
188+ | SvelteBoundary
183189 | SlotTemplateNode ,
184190 originalText : string ,
185191 stripLeadingAndTrailingNewline : boolean = false ,
@@ -400,6 +406,10 @@ export function shouldHugStart(
400406 return true ;
401407 }
402408
409+ if ( node . type === 'SvelteBoundary' ) {
410+ return false ;
411+ }
412+
403413 if ( isBlockElement ( node , options ) ) {
404414 return false ;
405415 }
@@ -434,6 +444,10 @@ export function shouldHugEnd(
434444 return true ;
435445 }
436446
447+ if ( node . type === 'SvelteBoundary' ) {
448+ return false ;
449+ }
450+
437451 if ( isBlockElement ( node , options ) ) {
438452 return false ;
439453 }
0 commit comments