Skip to content

Commit 38953b7

Browse files
Merge pull request #801 from HardyNLee/fix-parser
fix: parse argument when say content is blank
2 parents 857972e + 79a3ae2 commit 38953b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/parser/src/scriptParser/scriptParser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ export const scriptParser = (
3737

3838
// 去分号
3939
const commentSplit = sentenceRaw.split(/(?<!\\);/);
40-
let newSentenceRaw = commentSplit[0].trim();
40+
let newSentenceRaw = commentSplit[0];
4141
newSentenceRaw = newSentenceRaw.replaceAll('\\;',';');
4242
const sentenceComment = commentSplit[1] ?? '';
43-
if (newSentenceRaw === '') {
43+
if (newSentenceRaw.trim() === '') {
4444
// 注释提前返回
4545
return {
4646
command: commandType.comment, // 语句类型

0 commit comments

Comments
 (0)