mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
Update index.js
This commit is contained in:
1 parent
5d7710979d
commit
9fdbdabd7c
1 file changed
+8
-5
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user