LyricsProvider: Add missing newline

This commit is contained in:
Jonas Kvinge 2022-10-16 22:52:06 +02:00
parent bf904a6afa
commit c7bf2e1da8
1 changed files with 3 additions and 0 deletions

View File

@ -74,6 +74,9 @@ QString LyricsProvider::ParseLyricsFromHTML(const QString &content, const QRegul
start_idx = end_tag_idx + end_tag_length;
if (end_tag_idx > 0 || start_lyrics_tag_idx < end_tag_idx) {
if (!lyrics.isEmpty()) {
lyrics.append("\n");
}
lyrics.append(content.mid(start_lyrics_tag_idx, end_tag_idx - start_lyrics_tag_idx)
.replace(QRegularExpression("<br[^>]+>"), "\n")
.remove(QRegularExpression("<[^>]*>"))