Permalink
Browse files

tools: fix parsing of fields with : in them

  • Loading branch information...
1 parent b98e617 commit f9d5a831d6542c1f9923c225c0fa4c520e548342 @arturoc arturoc committed Dec 11, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 _tools/markdown_file.py
View
@@ -42,7 +42,12 @@ def list_all_files(module=''):
def addfield(method,line):
field = line.split(':')[0].lstrip('_').rstrip(' ')
- value = line.split(':')[1].lstrip(' ').rstrip('\n').rstrip('\r')[:-1]
+ value = line.split(':')[1]
+ if len(line.split(':'))>2:
+ for text in line.split(':')[2:]:
+ value = value + ":" + text
+
+ value = value.lstrip(' ').rstrip('\n').rstrip('\r')[:-1]
if field=='constant' or field=='advanced' or field=='visible' or field=='static':
value = ((value == '1') or (value == 'True') or (value=='true') or (value=='TRUE'))
#print field, "=", value

0 comments on commit f9d5a83

Please sign in to comment.