When update BlockStatement body, template literals within the code are reformatted with unexpected indentations if containing line breaks.
Steps to Reproduce:
import { parse, print } from 'recast';
const ast = parse('{`\n`}');
// simply mutate the body by adding a empty statement
ast.program.body[0].body.push({ loc: null, type: 'EmptyStatement', comments: null });
console.log(print(ast).code);
Expected Result:
if it's supposed to format the code then it should be
Actual Result:
where the indentation is unexpectedly added after the line break in template literal
Version
recast@0.23.11
Ref facebook/jscodeshift#664