Skip to content

Commit

Permalink
put ?s flag in front of regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilipp committed May 23, 2019
1 parent 17b866d commit 02519b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docrep/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,8 @@ def keep_types_s(s, types):
str
The modified string `s` with only the descriptions of `types`
"""
patt = '|'.join('(?<=\n)' + s + '\n(?s).+?\n(?=\S+|$)' for s in types)
patt = '(?s)' + '|'.join(
'(?<=\n)' + s + '\n.+?\n(?=\S+|$)' for s in types)
return ''.join(re.findall(patt, '\n' + s.strip() + '\n')).rstrip()

def save_docstring(self, key):
Expand Down

0 comments on commit 02519b4

Please sign in to comment.