Skip to content

Commit

Permalink
added re.S to regex call
Browse files Browse the repository at this point in the history
  • Loading branch information
mtill committed Dec 8, 2013
1 parent 38a6928 commit da58c72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MailWebsiteChanges.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ def parseSite(site):
return {'content': content, 'titles': titles, 'warning': warning}

if contentregex:
contents = [x for y in [re.findall(r'' + contentregex, c) for c in contents] for x in y]
contents = [x for y in [re.findall(r'' + contentregex, c, re.S) for c in contents] for x in y]
if titleregex:
titles = [x for y in [re.findall(r'' + titleregex, c) for c in titles] for x in y]
titles = [x for y in [re.findall(r'' + titleregex, c, re.S) for c in titles] for x in y]

if contentregex and titleregex and len(contents) != len(titles):
warning = 'WARNING: number of title blocks (' + str(len(titles)) + ') does not match number of content blocks (' + str(len(contents)) + ') after regex'
Expand Down

0 comments on commit da58c72

Please sign in to comment.