Browse Source

Merge branch 'trailing_newline_bug'

pull/226/head
Oliverpool 9 years ago
parent
commit
7c215e3b9a
  1. 1
      NEWS.md
  2. 2
      patacrep/songs/chordpro/__init__.py
  3. 2
      test/test_patatools/test_convert_failure/song.csg
  4. 2
      test/test_song/00.tsg

1
NEWS.md

@ -2,6 +2,7 @@
* Bugfixes
* The capo directive of the Chordpro files is now considered
* Chordpro files don't need to end with a trailing line [#223](https://github.com/patacrep/patacrep/pull/223)
# patacrep 5.0.0

2
patacrep/songs/chordpro/__init__.py

@ -42,7 +42,7 @@ class ChordproSong(Song):
def _parse(self):
"""Parse content, and return the dictionary of song data."""
with encoding.open_read(self.fullpath, encoding=self.encoding) as song:
song = parse_song(song.read(), self.fullpath)
song = parse_song(song.read().strip()+"\n", self.fullpath)
self.authors = song.authors
self.titles = song.titles
self.lang = song.get_data_argument('language', self.lang)

2
test/test_patatools/test_convert_failure/song.csg

@ -119,4 +119,4 @@
\endsong
\endsong{

2
test/test_song/00.tsg

@ -7,4 +7,6 @@
\endsong

Loading…
Cancel
Save