Skip to content

Commit

Permalink
fix: escaped unicode symbols error
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyinws committed Mar 8, 2024
1 parent f48b94a commit 9b1d562
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/transform/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ export function genConsoleString(genContext: GenContext) {
const fileName = getExtendedPath(filePath, extendedPathFileNames)
const fileType = extname(filePath)

// Parsing escaped unicode symbols
try {
argsName = JSON.parse(`"${argsName}"`)
}
catch (error) {

}

if (argsName?.length > 30)
argsName = `${argsName.slice(0, 30)}...`

Expand Down

0 comments on commit 9b1d562

Please sign in to comment.