Browse Source

Last space and line break are now outside chord \[

pull/58/head
Louis 10 years ago
parent
commit
52198b4084
  1. 7
      patacrep/plastex_chord.py

7
patacrep/plastex_chord.py

@ -147,8 +147,7 @@ class BeginChordOrDisplayMath(BeginDisplayMath):
if token is None:
return [chord]
elif match_space(token):
chord.appendChild(token)
return [chord]
return [chord, token]
elif (
isinstance(token, Verse)
or isinstance(token, VerseStar)
@ -176,11 +175,7 @@ class BeginChordOrDisplayMath(BeginDisplayMath):
(parsed, last) = parse_until(tex, match_space_or_chord)
# pylint: disable=expression-not-assigned
[chord.appendChild(item) for item in parsed]
if isinstance(last, Chord):
return [chord, last]
else:
chord.appendChild(last)
return [chord]
else:
return super(BeginChordOrDisplayMath, self).invoke(tex)

Loading…
Cancel
Save