Update index.js

This commit is contained in:
Harvey Zack committed 2025-05-23 00:32:08 +08:00
1 parent 5d7710979d
commit 9fdbdabd7c
1 file changed
+8 -5
+8 -5
View File
@@ -22,11 +22,14 @@ export default function artplayerPluginAsr(option = {}) {
});
function splitByPunctuation(text) {
return text
.split(/(?<=[、。!?!?\.])\s*/u)
.map((s) => s.trim())
.filter(Boolean)
.slice(-length);
return (
text
// eslint-disable-next-line no-useless-escape
.split(/(?<=[、。!?!?\.])\s*/u)
.map((s) => s.trim())
.filter(Boolean)
.slice(-length)
);
}
function hide() {