mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -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) {
|
function splitByPunctuation(text) {
|
||||||
return text
|
return (
|
||||||
.split(/(?<=[、。!?!?\.])\s*/u)
|
text
|
||||||
.map((s) => s.trim())
|
// eslint-disable-next-line no-useless-escape
|
||||||
.filter(Boolean)
|
.split(/(?<=[、。!?!?\.])\s*/u)
|
||||||
.slice(-length);
|
.map((s) => s.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
.slice(-length)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide() {
|
function hide() {
|
||||||
|
|||||||
Reference in new issue
Block a user