Browse Source

allow tilde in titles and artists

pull/239/head
Oliverpool 8 years ago
parent
commit
2d790bb3ad
  1. 8
      patacrep/data/templates/songs/chordpro/latex/song
  2. 6
      test/test_book/special.tex.control
  3. 6
      test/test_song/special.tsg

8
patacrep/data/templates/songs/chordpro/latex/song

@ -8,7 +8,7 @@
\beginsong{ \beginsong{
(*- for title in titles -*) (*- for title in titles -*)
(( title|escape_specials('{}&#_^%~$\\') )) (( title|escape_specials('{}&#_^%$\\') ))
(*- if not loop.last -*) (*- if not loop.last -*)
\\ \\
(* endif *) (* endif *)
@ -16,7 +16,7 @@
}[ }[
by={ by={
(* for author in authors *) (* for author in authors *)
(( author[1]|escape_specials('{}&#_^%~$\\') )) (( author[0]|escape_specials('{}&#_^%~$\\') )) (( author[1]|escape_specials('{}&#_^%$\\') )) (( author[0]|escape_specials('{}&#_^%$\\') ))
(*- if not loop.last -*) (*- if not loop.last -*)
, ,
(* endif *) (* endif *)
@ -24,7 +24,7 @@
}, },
(* for key in ['album', 'copyright'] *) (* for key in ['album', 'copyright'] *)
(* if key in metadata *) (* if key in metadata *)
(( key ))={(( metadata[key]|escape_specials('{}&#_^%~$\\') ))}, (( key ))={(( metadata[key]|escape_specials('{}&#_^%$\\') ))},
(* endif *) (* endif *)
(* endfor *) (* endfor *)
(* if 'url' in metadata *) (* if 'url' in metadata *)
@ -39,7 +39,7 @@
(* endblock *) (* endblock *)
(* endif *) (* endif *)
(* for key in metadata.morekeys *) (* for key in metadata.morekeys *)
(( key.keyword ))={(( key.argument|escape_specials('{}&#_^%~$\\') ))}, (( key.keyword ))={(( key.argument|escape_specials('{}&#_^%$\\') ))},
(* endfor *) (* endfor *)
] ]

6
test/test_book/special.tex.control

@ -134,10 +134,10 @@ guitar,
\selectlanguage{english} \selectlanguage{english}
\beginsong{\& \$ \% \# \_ \} \{ \textasciitilde{} \textasciicircum{} \textbackslash{}}[ \beginsong{\& \$ \% \# \_ \} \{ ~ \textasciicircum{} \textbackslash{}}[
by={ by={
\& \$ \% \# \_ \} \{ \textasciitilde{} \textasciicircum{} \textbackslash{} }, \& \$ \% \# \_ \} \{ ~ \textasciicircum{} \textbackslash{} },
album={\& \$ \% \# \_ \} \{ \textasciitilde{} \textasciicircum{} \textbackslash{}}, album={\& \$ \% \# \_ \} \{ ~ \textasciicircum{} \textbackslash{}},
url={http://&$\%\#_~^}, url={http://&$\%\#_~^},
] ]

6
test/test_song/special.tsg

@ -1,9 +1,9 @@
\selectlanguage{english} \selectlanguage{english}
\beginsong{\& \$ \% \# \_ \} \{ \textasciitilde{} \textasciicircum{} \textbackslash{}}[ \beginsong{\& \$ \% \# \_ \} \{ ~ \textasciicircum{} \textbackslash{}}[
by={ by={
\& \$ \% \# \_ \} \{ \textasciitilde{} \textasciicircum{} \textbackslash{} }, \& \$ \% \# \_ \} \{ ~ \textasciicircum{} \textbackslash{} },
album={\& \$ \% \# \_ \} \{ \textasciitilde{} \textasciicircum{} \textbackslash{}}, album={\& \$ \% \# \_ \} \{ ~ \textasciicircum{} \textbackslash{}},
url={http://&$\%\#_~^}, url={http://&$\%\#_~^},
] ]

Loading…
Cancel
Save