Browse Source

Correct starred sections and add test

pull/179/head
Oliverpool 9 years ago
parent
commit
1c47a23e57
  1. 2
      patacrep/content/__init__.py
  2. 2
      test/test_content/sections_short.control
  3. 2
      test/test_content/sections_short.source

2
patacrep/content/__init__.py

@ -174,7 +174,7 @@ def process_content(content, config=None):
"""
contentlist = []
plugins = config.get('_content_plugins', {})
keyword_re = re.compile(r'^ *(?P<keyword>\w*) *(\((?P<argument>.*)\))? *$')
keyword_re = re.compile(r'^ *(?P<keyword>[\w\*]*) *(\((?P<argument>.*)\))? *$')
if not content:
content = [["song"]]
for elem in content:

2
test/test_content/sections_short.control

@ -1 +1 @@
["section:(tradi)Traditional", "exsong.sg", "section:Example", "texsong.tsg", "chordpro.csg", "exsong.sg"]
["section:(tradi)Traditional", "exsong.sg", "section*:Example", "texsong.tsg", "chordpro.csg", "exsong.sg"]

2
test/test_content/sections_short.source

@ -1,6 +1,6 @@
[["section", "Traditional", "tradi"],
"exsong.sg",
["section", "Example"],
["section*", "Example"],
"texsong.tsg",
"chordpro.csg",
"exsong.sg"]
Loading…
Cancel
Save