From d41e4d2824bfb169e3fe778d193c5f131ca63827 Mon Sep 17 00:00:00 2001 From: Carlos Galindo Date: Mon, 21 Nov 2022 19:48:34 +0100 Subject: [PATCH] =?UTF-8?q?garantizar=20que=20los=20acordes=20est=C3=A1n?= =?UTF-8?q?=20alineados=20encima=20del=20texto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model.py b/src/model.py index fdd803f..6fddb26 100644 --- a/src/model.py +++ b/src/model.py @@ -149,7 +149,7 @@ class Line: self.lyric_arr.append(Line.ECHO_BEGIN if inside_echo else '') mid = True self.lyric_arr[-1] += self.text[i] - self.lyric_arr = [re.sub(r"(^ | $)", " ", l) for l in self.lyric_arr] + self.lyric_arr = [l if l != "" else " " for l in self.lyric_arr] def remove_brackets(self): self.lyric_arr = [l.replace('}', '').replace('{', '') for l in self.lyric_arr] @@ -173,7 +173,7 @@ class Chord: ENG_INDEX = {'C': 0, 'C#': 1, 'D&': 1, 'D': 2, 'D#': 3, 'E&': 3, 'E': 4, 'F&': 4, 'F': 5, 'E#': 5, 'F#': 6, 'G&': 6, 'G': 7, 'G#': 8, 'A&': 8, 'A': 9, 'A#': 10, 'B&': 10, 'B': 11, 'C&': 11, 'B#': 0} def __init__(self, text, base_transpose=0): - self.text = text + self.text = text + " " self.items = [] self.base_transpose = base_transpose ignore = False