diff --git a/patacrep/plastex_chord.py b/patacrep/plastex_chord.py index 5cf5caad..160682d3 100644 --- a/patacrep/plastex_chord.py +++ b/patacrep/plastex_chord.py @@ -37,6 +37,15 @@ def wrap_displaymath(cls): self.ownerDocument.context.push() self.ownerDocument.context.catcode("\n", 13) IN_VERSE += 1 + + # Removing spaces and line breaks at the beginning of verse + token = None + for token in tex: + if not match_space(token): + break + if token is not None: + tex.pushToken(token) + else: self.ownerDocument.context.pop() IN_VERSE -= 1