diff --git a/patacrep/songs/chordpro/data/html/content_newline b/patacrep/songs/chordpro/data/html/content_newline index 1915ec14..e69de29b 100644 --- a/patacrep/songs/chordpro/data/html/content_newline +++ b/patacrep/songs/chordpro/data/html/content_newline @@ -1 +0,0 @@ -
diff --git a/patacrep/songs/chordpro/data/html/content_verse b/patacrep/songs/chordpro/data/html/content_verse index eab4d361..6fe21f6b 100644 --- a/patacrep/songs/chordpro/data/html/content_verse +++ b/patacrep/songs/chordpro/data/html/content_verse @@ -1,6 +1,8 @@

- (*- for line in content.lines -*) - (* if not loop.first *)
(* endif -*) + (* for line in content.lines *) (( render(line) )) - (* endfor -*) + (*- if not loop.last *)
+ (* endif *) + (* endfor *) +

diff --git a/test/test_chordpro/newline.html b/test/test_chordpro/newline.html new file mode 100644 index 00000000..16cba958 --- /dev/null +++ b/test/test_chordpro/newline.html @@ -0,0 +1,50 @@ +Language: english
+ + + +
+

+ This is a verse
+ With a new line
+
+ The second part of the verse
+ Is this line +

+ +

+ Here is a new line at the end
+ +

+ +

+ Foo bar +

+ +

+
+ And a new line
+ At the beginning +

+ +

+ New lines can also
+
+ Be in chorus +

+ +

+ New lines can also
+
+ Be in bridges +

+ +

+ New lines can also
+
+ Be surrounded by spaces +

+ +

+ New lines can't appear in the middle of a line +

+
diff --git a/test/test_chordpro/test_parser.py b/test/test_chordpro/test_parser.py index 8f857156..805d1583 100644 --- a/test/test_chordpro/test_parser.py +++ b/test/test_chordpro/test_parser.py @@ -14,6 +14,7 @@ from .. import disable_logging LANGUAGES = { 'tex': 'latex', 'sgc': 'chordpro', + 'html': 'html', } class FileTestMeta(type):