Permalink
Browse files

Fuzzy underline length detection

  • Loading branch information...
1 parent 8795e10 commit 6c0d9d74d86aaecfd1d1a248ff2f1b08d303aa65 @cbonte committed Jun 16, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 haproxy-dconv.py
View
@@ -238,7 +238,8 @@ def convert(infile, outfile):
next = data[i + 1].rstrip()
else:
next = ""
- if (line == "Summary" or re.match("^[0-9].*", line)) and (len(next) > 0) and (next[0] == '-') and ("-" * len(line) == next):
+ if (line == "Summary" or re.match("^[0-9].*", line)) and (len(next) > 0) and (next[0] == '-') \
+ and ("-" * len(line)).startswith(next): # Fuzzy underline length detection
sections.append(currentSection)
currentSection = {
"details": getTitleDetails(line),

0 comments on commit 6c0d9d7

Please sign in to comment.