Skip to content

Commit

Permalink
remove square brackets (#1594)
Browse files Browse the repository at this point in the history
  • Loading branch information
NhatMinh0208 authored Mar 21, 2024
1 parent 46317e3 commit 5c1c86b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/utils/astToString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ function formatComments(state: any, comments: any, indent: any, lineEnd: any) {

const sourceGen = Object.assign({}, astring.GENERATOR, {
StatementSequence: function (node: any, state: any) {
const indent = state.indent.repeat(state.indentLevel++)
const indent = state.indent.repeat(state.indentLevel)
const { lineEnd, writeComments } = state
const statementIndent = indent + state.indent
state.write('[')
const statements = node.body
if (statements != null && statements.length > 0) {
state.write(lineEnd)
Expand Down Expand Up @@ -73,8 +72,6 @@ const sourceGen = Object.assign({}, astring.GENERATOR, {
if (writeComments && node.trailingComments != null) {
formatComments(state, node.trailingComments, statementIndent, lineEnd)
}
state.write(']')
state.indentLevel--
}
})

Expand Down

0 comments on commit 5c1c86b

Please sign in to comment.