提交 abb68948 编写于 作者: fxy060608's avatar fxy060608

fix(uvue): 修复语法解析错误行号

上级 71a37d75
......@@ -9,7 +9,7 @@ export {
export function parseUTSSyntaxError(error: any, inputDir: string): string {
if (error instanceof Error) {
error = error.message + (error.stack ? `\n` + error.stack : ``)
error = error.message
}
let msg = String(error).replace(/\t/g, ' ')
let res: RegExpExecArray | null = null
......@@ -19,7 +19,7 @@ export function parseUTSSyntaxError(error: any, inputDir: string): string {
msg = msg.replace(
row,
`at ${relative(filename.split('?')[0], inputDir)}:${
parseInt(line) + 1
parseInt(line) + 3
}:${column}`
)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册