diff --git a/patacrep/data/templates/songs/chordpro/chordpro/content_meta b/patacrep/data/templates/songs/chordpro/chordpro/content_meta index 228cd8d5..a4015066 100644 --- a/patacrep/data/templates/songs/chordpro/chordpro/content_meta +++ b/patacrep/data/templates/songs/chordpro/chordpro/content_meta @@ -1 +1 @@ -{meta: (( content.argument[0] )):(( content.argument[1] ))} \ No newline at end of file +{meta: (( content.argument[0] )):(( content.argument[2] ))} \ No newline at end of file diff --git a/patacrep/data/templates/songs/chordpro/latex/content_meta b/patacrep/data/templates/songs/chordpro/latex/content_meta index b0d05b83..919f95a7 100644 --- a/patacrep/data/templates/songs/chordpro/latex/content_meta +++ b/patacrep/data/templates/songs/chordpro/latex/content_meta @@ -1 +1 @@ -\metacrep{((- content.argument[0] -))}{((- content.argument[1] -))} \ No newline at end of file +\metacrep{((- content.argument[0] -))}{((- content.argument[2] -))} \ No newline at end of file diff --git a/patacrep/songs/chordpro/ast.py b/patacrep/songs/chordpro/ast.py index 04ac32b9..dc5021da 100644 --- a/patacrep/songs/chordpro/ast.py +++ b/patacrep/songs/chordpro/ast.py @@ -357,7 +357,7 @@ class Directive(AST): super().__init__() self.keyword = directive_name(keyword.strip()) if keyword == 'meta': - argument = argument.split(':') + argument = argument.partition(':') self.argument = argument @property diff --git a/test/test_song/metacrep.csg b/test/test_song/metacrep.csg index cde69edc..6ef84bc3 100644 --- a/test/test_song/metacrep.csg +++ b/test/test_song/metacrep.csg @@ -7,7 +7,10 @@ Let's sing and test a -{meta: undefined:} +{meta: emptyarg:} directive between verses + + +{meta: and: with: more: arguments} diff --git a/test/test_song/metacrep.csg.source b/test/test_song/metacrep.csg.source index fbee0042..da51bf41 100644 --- a/test/test_song/metacrep.csg.source +++ b/test/test_song/metacrep.csg.source @@ -4,6 +4,8 @@ Let's sing and test a -{meta: undefined} +{meta: emptyarg} directive between verses + +{meta: and: with: more: arguments} diff --git a/test/test_song/metacrep.tsg b/test/test_song/metacrep.tsg index 6b033c4a..c83308ac 100644 --- a/test/test_song/metacrep.tsg +++ b/test/test_song/metacrep.tsg @@ -15,7 +15,7 @@ \end{verse} -\metacrep{undefined}{} +\metacrep{emptyarg}{} @@ -23,4 +23,8 @@ directive between verses \end{verse} + +\metacrep{and}{ with: more: arguments} + + \endsong