diff --git a/openlp/plugins/songs/lib/openlyricsxml.py b/openlp/plugins/songs/lib/openlyricsxml.py index f8c316cc8..8edb64e84 100644 --- a/openlp/plugins/songs/lib/openlyricsxml.py +++ b/openlp/plugins/songs/lib/openlyricsxml.py @@ -71,6 +71,7 @@ log = logging.getLogger(__name__) NAMESPACE = 'http://openlyrics.info/namespace/2009/song' NSMAP = '{{' + NAMESPACE + '}}{tag}' +NEWPAGETAG = '

' class SongXML(object): @@ -472,6 +473,7 @@ class OpenLyrics(object): text = text.replace('{{/{tag}}}'.format(tag=tag), '') # Replace \n with
. text = text.replace('\n', '
') + text = text.replace('[--}{--]', NEWPAGETAG) element = etree.XML('{text}'.format(text=text)) verse_element.append(element) return element @@ -634,6 +636,9 @@ class OpenLyrics(object): if element.tail: text += element.tail return text + elif newlines and element.tag == NSMAP.format(tag='p') and 'page-break-after' in str(element.attrib): + text += '[--}{--]' + return text # Start formatting tag. if element.tag == NSMAP.format(tag='tag'): text += '{{{name}}}'.format(name=element.get('name'))