Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def preprocess(s, state):
state.update({
'def_links': {},
'def_footnotes': {},
'footnotes': [],
})
if s is None:
s = '\n'
else:
s = s.replace('\u2424', '\n')
s = _newline_pattern.sub('\n', s)
s = _blank_lines.sub('', s)
s = expand_leading_tab(s)
if not s.endswith('\n'):
s += '\n'
return s, state