Refactor code structure for improved readability and maintainability

This commit is contained in:
Harvey Zack committed 2025-05-23 09:58:16 +08:00
1 parent 4bdad1675b
commit 1ece90c582
14 files changed
+17 -18

No files matched your search

@@ -185,7 +185,8 @@ function artplayerPluginAsr(option = {}) {
html: ''
});
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() {
$asr.style.display = 'none';