Merge branch 'main' into next
# Conflicts: # package.json # src/language-css/printer-postcss.js # src/language-handlebars/printer-glimmer.js # src/language-markdown/clean.js # src/language-markdown/printer-markdown.js # yarn.lock
This commit is contained in:
commit
daeb90f1ca
25 files changed
+423
-45
No files matched your search
@@ -914,7 +914,7 @@ function genericPrint(path, options, print) {
|
||||
);
|
||||
const shouldPrintComma =
|
||||
!isLast || (isVarFunction && hasComma());
|
||||
const printed = [
|
||||
let printed = [
|
||||
printedGroups[index],
|
||||
shouldPrintComma ? "," : "",
|
||||
];
|
||||
@@ -929,7 +929,7 @@ function genericPrint(path, options, print) {
|
||||
) {
|
||||
const parts = getDocParts(printed[0].contents.contents);
|
||||
parts[1] = group(parts[1]);
|
||||
return group(dedent(printed));
|
||||
printed = [group(dedent(printed))];
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -937,9 +937,14 @@ function genericPrint(path, options, print) {
|
||||
child.type === "value-comma_group" &&
|
||||
isNonEmptyArray(child.groups)
|
||||
) {
|
||||
const last = child.groups.at(-1);
|
||||
let last = child.groups.at(-1);
|
||||
|
||||
// `value-paren_group` does not have location info, but its closing parenthesis does.
|
||||
if (!last.source && last.close) {
|
||||
last = last.close;
|
||||
}
|
||||
|
||||
if (
|
||||
// `value-paren_group` missing location info
|
||||
last.source &&
|
||||
isNextLineEmpty(options.originalText, last, locEnd)
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user