Browse Source

[test] Mark # as an escapable character

pull/213/head
Louis 9 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
def t_literal(token):
r'\[{} \]'
r'\[{} \#]'
t.type = t.type[1]
return t

4
test/test_song/latex.csg.source

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

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

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

Loading…
Cancel
Save