From c52d309a883b90c3ef21d5b3f515ee17ace0279c Mon Sep 17 00:00:00 2001 From: Louis Date: Sun, 20 Mar 2016 22:05:27 +0100 Subject: [PATCH] [test] Mark # as an escapable character --- patacrep/songs/chordpro/lexer.py | 2 +- test/test_song/latex.csg.source | 4 ++-- .../test_songbook/latex_special_datadir/songs/special.csg | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/patacrep/songs/chordpro/lexer.py b/patacrep/songs/chordpro/lexer.py index ad9c4d20..ffeec7d4 100644 --- a/patacrep/songs/chordpro/lexer.py +++ b/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 diff --git a/test/test_song/latex.csg.source b/test/test_song/latex.csg.source index c00062f6..bbe53f98 100644 --- a/test/test_song/latex.csg.source +++ b/test/test_song/latex.csg.source @@ -2,8 +2,8 @@ {artist: & $ % # _ \} \{ ~ ^ \\} {album: & $ % # _ \} \{ ~ ^ \\} -& $ % # _ \} \{ ~ ^ \\ +& $ % \# _ \} \{ ~ ^ \\ {start_of_chorus} -& $ % # _ \} \{ ~ ^ \\ +& $ % \# _ \} \{ ~ ^ \\ {end_of_chorus} diff --git a/test/test_songbook/latex_special_datadir/songs/special.csg b/test/test_songbook/latex_special_datadir/songs/special.csg index 0f058af6..29caee7a 100644 --- a/test/test_songbook/latex_special_datadir/songs/special.csg +++ b/test/test_songbook/latex_special_datadir/songs/special.csg @@ -1,8 +1,8 @@ -{title : & % $ # _ \} \{ ~ ^ \\ } -{by: & % $ # _ }\ \{ ~ ^ \\ } +{title : & % $ \# _ \} \{ ~ ^ \\ } +{by: & % $ \# _ }\ \{ ~ ^ \\ } -& % $ # _ }\ \{ ~ ^ \\ +& % $ \# _ }\ \{ ~ ^ \\ {soc} - & % $ # _ }\ \{ ~ ^ \\ + & % $ \# _ }\ \{ ~ ^ \\ {eoc}