Skip to content

Commit

Permalink
Fix regex escaping lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewwardrop committed Oct 4, 2018
1 parent 7f644a1 commit d885b9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions knowledge_repo/converters/gdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def from_file(self, url, download_path=None, **opts):

headers = self.kp.headers
if 'title' in headers and headers['title'].startswith('[]'):
headers['title'] = re.sub('\[\]\{[^\}]+\}', '', headers['title'])
headers['title'] = re.sub(r'\[\]\{[^\}]+\}', '', headers['title'])
if 'subtitle' in headers and headers['subtitle'].startswith('[]'):
headers['subtitle'] = re.sub('\[\]\{[^\}]+\}', '', headers['subtitle'])
headers['subtitle'] = re.sub(r'\[\]\{[^\}]+\}', '', headers['subtitle'])
self.kp.update_headers(**headers)

0 comments on commit d885b9f

Please sign in to comment.