Browse Source

Removing leading spaces and line breaks in verses

pull/58/head
Louis 11 years ago
parent
commit
59517b3245
  1. 9
      patacrep/plastex_chord.py

9
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

Loading…
Cancel
Save