File tree 3 files changed +14
-2
lines changed
packages/prettier-plugin-liquid/src
3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -524,10 +524,11 @@ export function printLiquidDocParam(
524
524
}
525
525
526
526
if ( node . paramDescription . value ) {
527
+ const normalizedDescription = node . paramDescription . value . replace ( / \s + / g, ' ' ) . trim ( ) ;
527
528
if ( node . paramDescription . dashSeparated ) {
528
- parts . push ( ' - ' , node . paramDescription . value ) ;
529
+ parts . push ( ' - ' , normalizedDescription ) ;
529
530
} else {
530
- parts . push ( ' ' , node . paramDescription . value ) ;
531
+ parts . push ( ' ' , normalizedDescription ) ;
531
532
}
532
533
}
533
534
Original file line number Diff line number Diff line change @@ -22,3 +22,8 @@ It should format the param description with a dash separator
22
22
{% doc %}
23
23
@param paramName - param with description
24
24
{% enddoc %}
25
+
26
+ It should normalize the param description
27
+ {% doc %}
28
+ @param paramName param with description
29
+ {% enddoc %}
Original file line number Diff line number Diff line change @@ -22,3 +22,9 @@ It should format the param description with a dash separator
22
22
{% doc %}
23
23
@param paramName - param with description
24
24
{% enddoc %}
25
+
26
+ It should normalize the param description
27
+ {% doc %}
28
+ @param paramName param with description
29
+ {% enddoc %}
30
+
You can’t perform that action at this time.
0 commit comments