Skip to content

Fix trimming leading whitespaces

Gyuris Gellért requested to merge gyuris/openlp:openLyrics-whitespaces into master

As in #1534 (closed) described, currently OL does not strip leading whitespaces during OpenLyics import. This is a regression introduced with d2cf191d (or bd811c2b?).

Currently this OpenLyrics XML code...

      <lines>
        The <chord name="G"/>splendor of the <chord name="D/F#"/>King<br/>
        <chord name="Em7"/>Clothed in majesty<br/>
        Let all the earth <chord name="Cmaj7"/>rejoice<br/>
        All the earth rejoice<br/>
        He <chord name="D"/>wraps <chord name="G"/>Himself in <chord name="D/F#"/>light<br/>
        And <chord name="Em7"/>darkness tries to hide<br/>
        And trembles at His <chord name="Cmaj7"/>voice<br/>
        And trembles at His <chord name="D"/>voice
      </lines>

...produces:

The [G]splendor of the [D/F#]King

        [Em7]Clothed in majesty

        Let all the earth [Cmaj7]rejoice
All the earth rejoice

        He [D]wraps [G]Himself in [D/F#]light

        And [Em7]darkness tries to hide

        And trembles at His [Cmaj7]voice

        And trembles at His [D]voice

With this patch the imported value is:

The [G]splendor of the [D/F#]King
[Em7]Clothed in majesty
Let all the earth [Cmaj7]rejoice
All the earth rejoice
He [D]wraps [G]Himself in [D/F#]light
And [Em7]darkness tries to hide
And trembles at His [Cmaj7]voice
And trembles at His [D]voice

Fix #1534 (closed)

Merge request reports