Skip to content

修复 #1246 错误#1253

Merged
CodFrm merged 5 commits intoscriptscat:release/v1.3from
cyfung1031:fix-code-line-01
Feb 15, 2026
Merged

修复 #1246 错误#1253
CodFrm merged 5 commits intoscriptscat:release/v1.3from
cyfung1031:fix-code-line-01

Conversation

@cyfung1031
Copy link
Collaborator

fix #1246

@CodFrm
Copy link
Member

CodFrm commented Feb 15, 2026

不是这个原因,一样有问题

@cyfung1031 cyfung1031 marked this pull request as draft February 15, 2026 07:18
@CodFrm
Copy link
Member

CodFrm commented Feb 15, 2026

你使用沉浸式翻译可以复现,我修改了一个版本

@cyfung1031
Copy link
Collaborator Author

你使用沉浸式翻译可以复现,我修改了一个版本

我刚发现我有脚本能重视问题。在找方法

@cyfung1031 cyfung1031 marked this pull request as ready for review February 15, 2026 07:29
@cyfung1031
Copy link
Collaborator Author

你使用沉浸式翻译可以复现,我修改了一个版本

修好了。你再跑一下看看

Comment on lines 103 to 105
// 用 function replacer 让replace不识别$
const output = text.replace(/\s*__FUNCTION_BODY__\s*/, () => "\n" + code + "\n");
return output;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?和我刚刚的有什么区别

This comment was marked as outdated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

呀。我記錯了

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

换回之前的吧,都不需要 \s* 也不需要加换行

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你的版本對的

@CodFrm CodFrm merged commit 1dff566 into scriptscat:release/v1.3 Feb 15, 2026
2 checks passed
@cyfung1031
Copy link
Collaborator Author

呀。我现在才懂你的意思
即使不是 regex 的 replace, 它也会看 code 代码里的 $
第一次遇到这个问题

@CodFrm
Copy link
Member

CodFrm commented Feb 15, 2026

呀。我现在才懂你的意思 即使不是 regex 的 replace, 它也会看 code 代码里的 $ 第一次遇到这个问题

确实,很奇怪,我看MDN说是字符串也不会的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants