From 66b1e444d1ca4071767aebc88769fdb783aba922 Mon Sep 17 00:00:00 2001 From: Alain Nussbaumer Date: Sun, 26 Nov 2023 15:59:14 +0100 Subject: [PATCH] [web] Format source code --- web-src/src/components/LyricsPane.vue | 28 +++++++++++++-------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/web-src/src/components/LyricsPane.vue b/web-src/src/components/LyricsPane.vue index 9161eae9..7728d7a4 100644 --- a/web-src/src/components/LyricsPane.vue +++ b/web-src/src/components/LyricsPane.vue @@ -80,21 +80,19 @@ export default { lyrics() { const lyrics = this.$store.getters.lyrics const lyricsObj = [] - if (lyrics) { - const regex = /(\[(\d+):(\d+)(?:\.\d+)?\] ?)?(.*)/ - lyrics.split('\n').forEach((item) => { - const matches = regex.exec(item) - if (matches && matches[4]) { - const obj = [matches[4]] - if (matches[2] && matches[3]) - obj.push( - matches[2] * 60 + matches[3] * 1 - ) - lyricsObj.push(obj) - } - }) - } - return lyricsObj + if (lyrics) { + const regex = /(\[(\d+):(\d+)(?:\.\d+)?\] ?)?(.*)/ + lyrics.split('\n').forEach((item) => { + const matches = regex.exec(item) + if (matches && matches[4]) { + const obj = [matches[4]] + if (matches[2] && matches[3]) + obj.push(matches[2] * 60 + matches[3] * 1) + lyricsObj.push(obj) + } + }) + } + return lyricsObj }, player() { return this.$store.state.player