diff --git a/client/testFixture/formatter/expected.sas b/client/testFixture/formatter/expected.sas index a6bc781d1..f54188e54 100644 --- a/client/testFixture/formatter/expected.sas +++ b/client/testFixture/formatter/expected.sas @@ -88,13 +88,11 @@ quit; %macro reportit(request); %if %upcase(&request)=STAT %then %do; - proc means; title "Summary of All Numeric Variables"; run; %end; %else %if %upcase(&request)=PRINTIT %then %do; - proc print; title "Listing of Data"; run; @@ -105,7 +103,6 @@ quit; *region; %macro; - *region; data _null_; *region; diff --git a/server/src/sas/formatter/printer.ts b/server/src/sas/formatter/printer.ts index 55af1b745..eb1231c61 100644 --- a/server/src/sas/formatter/printer.ts +++ b/server/src/sas/formatter/printer.ts @@ -45,7 +45,12 @@ export const print: Printer["print"] = (path, options, print) => { ); if (node.type === "region") { const region = printRegion(children); - return !path.isFirst && node.block ? [hardline, ...region] : region; + return !( + path.isFirst || + (path.index === 1 && path.parent?.type === "region") + ) && node.block + ? [hardline, ...region] + : region; } return [...join(line, children), literalline]; }