Skip to content

Commit

Permalink
line_match and line_start API. #4
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Mar 4, 2014
1 parent 1bc60f6 commit 6e7c17e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mistune.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ def manipulate(src):
m = rule.match(src)
if not m:
continue
self._match = m
getattr(self, 'parse_%s' % key)(m)
return m
return False
Expand Down Expand Up @@ -508,14 +507,16 @@ def manipulate(src):
m = pattern.match(src)
if not m:
continue
self._match = m
self.line_match = m
out = getattr(self, 'output_%s' % key)(m)
if out is not None:
return m, out
return False

self.line_start = True
while src:
ret = manipulate(src)
self.line_start = False
if ret is not False:
m, out = ret
output += out
Expand Down

0 comments on commit 6e7c17e

Please sign in to comment.