Browse Source

[test] Mark # as an escapable character

pull/213/head
Louis 8 years ago
parent
commit
c52d309a88
  1. 2
      patacrep/songs/chordpro/lexer.py
  2. 4
      test/test_song/latex.csg.source
  3. 8
      test/test_songbook/latex_special_datadir/songs/special.csg

2
patacrep/songs/chordpro/lexer.py

@ -154,7 +154,7 @@ class ChordProLexer:
@staticmethod @staticmethod
def t_literal(token): def t_literal(token):
r'\[{} \]' r'\[{} \#]'
t.type = t.type[1] t.type = t.type[1]
return t return t

4
test/test_song/latex.csg.source

@ -2,8 +2,8 @@
{artist: & $ % # _ \} \{ ~ ^ \\} {artist: & $ % # _ \} \{ ~ ^ \\}
{album: & $ % # _ \} \{ ~ ^ \\} {album: & $ % # _ \} \{ ~ ^ \\}
& $ % # _ \} \{ ~ ^ \\ & $ % \# _ \} \{ ~ ^ \\
{start_of_chorus} {start_of_chorus}
& $ % # _ \} \{ ~ ^ \\ & $ % \# _ \} \{ ~ ^ \\
{end_of_chorus} {end_of_chorus}

8
test/test_songbook/latex_special_datadir/songs/special.csg

@ -1,8 +1,8 @@
{title : & % $ # _ \} \{ ~ ^ \\ } {title : & % $ \# _ \} \{ ~ ^ \\ }
{by: & % $ # _ }\ \{ ~ ^ \\ } {by: & % $ \# _ }\ \{ ~ ^ \\ }
& % $ # _ }\ \{ ~ ^ \\ & % $ \# _ }\ \{ ~ ^ \\
{soc} {soc}
& % $ # _ }\ \{ ~ ^ \\ & % $ \# _ }\ \{ ~ ^ \\
{eoc} {eoc}

Loading…
Cancel
Save