# HG changeset patch # User Paul Boddie # Date 1267056158 -3600 # Node ID 81896d36e5c12f422d8790d1156e39772580e234 # Parent 9b45f144019f51a9fa395830e9d5a8f794fdebe4 Fixed definition list parsing and value processing to handle empty definitions. diff -r 9b45f144019f -r 81896d36e5c1 EventAggregatorSupport.py --- a/EventAggregatorSupport.py Wed Feb 24 02:06:36 2010 +0100 +++ b/EventAggregatorSupport.py Thu Feb 25 01:02:38 2010 +0100 @@ -35,7 +35,7 @@ # Page parsing. -definition_list_regexp = re.compile(ur'(?P^(?P#*)\s+(?P.*?)::\s)(?P.*?)$', re.UNICODE | re.MULTILINE) +definition_list_regexp = re.compile(ur'(?P^(?P#*)\s+(?P.*?):: )(?P.*?)$', re.UNICODE | re.MULTILINE) category_membership_regexp = re.compile(ur"^\s*((Category\S+)(\s+Category\S+)*)\s*$", re.MULTILINE | re.UNICODE) # Value parsing. @@ -288,7 +288,7 @@ # Lists (whose elements may be quoted). elif term in ("topics", "categories"): - desc = [getSimpleWikiText(value.strip()) for value in desc.split(",")] + desc = [getSimpleWikiText(value.strip()) for value in desc.split(",") if value.strip()] # Labels which may well be quoted. diff -r 9b45f144019f -r 81896d36e5c1 README.txt --- a/README.txt Wed Feb 24 02:06:36 2010 +0100 +++ b/README.txt Thu Feb 25 01:02:38 2010 +0100 @@ -174,6 +174,10 @@ * Added print stylesheet rules in order to improve the printed versions of calendars. + * Fixed definition list parsing to handle completely empty definitions + (having no space after the "::" token) which previously captured text from + subsequent lines, and merely empty definitions which previously would have + produced a single empty value for definitions providing lists of values. New in EventAggregator 0.5 (Changes since EventAggregator 0.4) --------------------------------------------------------------