From d4fb8654986d1dabdacea9f76486623bb6994c19 Mon Sep 17 00:00:00 2001 From: "sumpfork@mailmight.com" Date: Thu, 20 Jun 2013 14:57:11 -0700 Subject: [PATCH] Bump version to 1.8; fix '-' getting eaten on Curse --- __init__.py | 2 +- dominion_tabs.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index 71eab95..e50ff95 100644 --- a/__init__.py +++ b/__init__.py @@ -1,3 +1,3 @@ #main package -__version__ = '1.7' +__version__ = '1.8' diff --git a/dominion_tabs.py b/dominion_tabs.py index e7b01ff..5ef49ca 100644 --- a/dominion_tabs.py +++ b/dominion_tabs.py @@ -329,6 +329,7 @@ class DominionTabs: #print c.name + ' ::: ' + extra def add_definition_line(self,card,line): + #try to figure out if this a 'basic action' like +X Cards or +Y Actions baseaction = re.compile("^\s*(\+\d+\s+\w+)(?:[,.;])") m = baseaction.match(line) prefix = '' @@ -337,12 +338,17 @@ class DominionTabs: line = line[m.end():] m = baseaction.match(line) line = prefix + line + #this is a messy way to preserve the way the card spec file indicates separation + #and add our own via '---' sequences. Needs to be completely replaced, probably + #at the same time as changing the card spec file format. if not card.description.strip().endswith(';')\ and not card.description.strip().endswith('---')\ - and not line.startswith('---'): + and not line.startswith('-'): card.description += '----' + line else: card.description += line + if card.name == 'Curse': + print card.description def read_card_defs(self,fname,fileobject=None): cards = []