File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
packages/render/src/shared/utils Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -235,12 +235,7 @@ const prettyNodes = (
235
235
formatted += node . content ;
236
236
} else {
237
237
const rawText = node . content . replaceAll ( / ( \r | \n | \r \n ) \s * / g, '' ) ;
238
- formatted += wrapText (
239
- rawText ,
240
- indentation ,
241
- maxLineLength - currentIndentationSize ,
242
- lineBreak ,
243
- ) ;
238
+ formatted += wrapText ( rawText , indentation , maxLineLength , lineBreak ) ;
244
239
}
245
240
formatted += lineBreak ;
246
241
} else if ( node . type === 'tag' ) {
@@ -249,7 +244,7 @@ const prettyNodes = (
249
244
. join ( '' ) ;
250
245
251
246
const rawTagStart = `${ indentation } <${ node . name } ${ propertiesRawString } ${ node . void ? '/' : '' } >` ;
252
- if ( rawTagStart . length > maxLineLength ) {
247
+ if ( rawTagStart . length - currentIndentationSize > maxLineLength ) {
253
248
let tagStart = `${ indentation } <${ node . name } ${ lineBreak } ` ;
254
249
for ( const property of node . properties ) {
255
250
tagStart += `${ indentation } ${ property . name } =${ property . value } ${ lineBreak } ` ;
You can’t perform that action at this time.
0 commit comments