mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 21:01:20 -08:00
Refactor code structure for improved readability and maintainability
This commit is contained in:
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';
|
||||
|
||||
Reference in new issue
Block a user