From: duplo Date: Mon, 19 Jan 2009 13:35:20 +0000 (+0000) Subject: Modify the regexp for the configuration parameter comments X-Git-Tag: 2.1.0~502 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=1ebf147629d5ac01251a964ad5a2f498f487091c;p=bertos.git Modify the regexp for the configuration parameter comments git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2180 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index fc225d0a..428e11e6 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -96,8 +96,8 @@ def getInfos(definition): def getDefinitionBlocks(text): block = [] - block_tmp = re.findall("^/\*+\s*(.*?)\s*?\*/\s*#define\s+(\w+[\s\w]*?)\s*$", text, re.DOTALL | re.MULTILINE) + block_tmp = re.findall(r"/\*{2}\s*([^*]*\*(?:[^/*][^*]*\*+)*)/\s*#define\s+(.*?)\s*?$", text, re.MULTILINE) for comment, define in block_tmp: - block.append((" ".join(re.findall("^\s*\*?\s*(.*?)\s*?$", comment, re.MULTILINE)), define)) - block += re.findall("/{3}