Browse Source

Last space and line break are now outside chord \[

pull/58/head
Louis 11 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: if token is None:
return [chord] return [chord]
elif match_space(token): elif match_space(token):
chord.appendChild(token) return [chord, token]
return [chord]
elif ( elif (
isinstance(token, Verse) isinstance(token, Verse)
or isinstance(token, VerseStar) or isinstance(token, VerseStar)
@ -176,11 +175,7 @@ class BeginChordOrDisplayMath(BeginDisplayMath):
(parsed, last) = parse_until(tex, match_space_or_chord) (parsed, last) = parse_until(tex, match_space_or_chord)
# pylint: disable=expression-not-assigned # pylint: disable=expression-not-assigned
[chord.appendChild(item) for item in parsed] [chord.appendChild(item) for item in parsed]
if isinstance(last, Chord):
return [chord, last] return [chord, last]
else:
chord.appendChild(last)
return [chord]
else: else:
return super(BeginChordOrDisplayMath, self).invoke(tex) return super(BeginChordOrDisplayMath, self).invoke(tex)

Loading…
Cancel
Save