From 89d19778fb51fa3fb67e4f22bed38a697761e8dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Wed, 5 Jun 2024 22:47:35 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Fix=20OpenLP=20export?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/utils.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/frontend/src/utils.js b/frontend/src/utils.js index 82d89a02..3d23083f 100644 --- a/frontend/src/utils.js +++ b/frontend/src/utils.js @@ -337,7 +337,7 @@ const openLyricsXML = (song, version, locales = [], allTags = null) => { const subtitle = song.subtitle ? `${song.subtitle}` : ''; const year = song.year ? `${song.year}` : ''; const copyright = song.year || song.publisher - ? '' + song.year + ' ' + song.publisher.replace(/(?:\r\n|\r|\n)/g, '; ') + '' + ? '' + song.year + ' ' + song.publisher.replace(/(?:\r\n|\r|\n)/g, '; ').replace(/&/gi, '&') + '' : ''; const ccli = song.ccli ? `${song.ccli}` : ''; const authors = song.authors @@ -349,18 +349,12 @@ const openLyricsXML = (song, version, locales = [], allTags = null) => { ).join('') + '' : ''; const lyrics = parsedContent(song.content, song.tuning, false, false).map(p => { + const type = p.type ? p.type.toUpperCase() : 'V'; const num = p.number > 0 ? p.number : '1'; - return `` + p.content.replace(/\n/g, "
") + '
' + return `` + p.content.replace(/\n/g, "
") + '
' }).join(''); - return ` - - - ${title}${subtitle} - ${copyright}${year}${ccli}${authors}${tags} - - ${lyrics} - `; + return `${title}${subtitle}${copyright}${year}${ccli}${authors}${tags}${lyrics}`; }; export {