Skip to content

Commit

Permalink
flake8 cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ikirudennis committed Aug 5, 2024
1 parent 2bd17f4 commit bbd04f8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions textile/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ def __init__(self, restricted=False, lite=False, noimage=False,
self.refIndex = 0
self.block_tags = block_tags

cur = r''
if regex_snippets['cur']: # pragma: no branch
cur = r'(?:[{0}]{1}*)?'.format(regex_snippets['cur'],
regex_snippets['space'])
Expand Down Expand Up @@ -424,7 +423,7 @@ def fPBr(self, m):
re.compile(r"<br[ ]*/?>{0}*\n(?![{0}|])".format(regex_snippets['space']),
re.I)
.sub("\n", content))
content = re.compile(r"\n(?![\s|])").sub('<br />',content)
content = re.compile(r"\n(?![\s|])").sub('<br />', content)
return '<{0}{1}>{2}{3}'.format(m.group(1), m.group(2), content, m.group(4))

def doBr(self, match):
Expand Down Expand Up @@ -1122,11 +1121,11 @@ def storeTags(self, opentag, closetag=''):
tags = {}
self.refIndex += 1
self.refCache[self.refIndex] = opentag
tags['open'] = self.uid + str(self.refIndex) + ':ospan ';
tags['open'] = self.uid + str(self.refIndex) + ':ospan '

self.refIndex += 1
self.refCache[self.refIndex] = closetag
tags['close'] = ' ' + self.uid + str(self.refIndex) + ':cspan';
tags['close'] = ' ' + self.uid + str(self.refIndex) + ':cspan'
return tags

def retrieveTags(self, text):
Expand All @@ -1139,7 +1138,6 @@ def retrieveTags(self, text):
def fRetrieveTags(self, match):
return self.refCache[int(match.group('token'))]


def image(self, text):
pattern = re.compile(r"""
(?:[\[{{])? # pre
Expand Down

0 comments on commit bbd04f8

Please sign in to comment.