diff options
author | rsiddharth <s@ricketyspace.net> | 2017-02-23 01:15:06 +0000 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2017-02-23 01:15:06 +0000 |
commit | 2fcde808761b80577231e61f89d35e64a6c5dffb (patch) | |
tree | e636f20533908283b9eb69f742ca5fe6dba0464d | |
parent | 72d9e150b73d43838cba0292de5b4f7c63219fef (diff) |
mdl_style: Update `LSMarkdown` class.
Reset renderer's footnote link related variables each time text is
parsed with the `LSMarkdown.parse` method.
* markdown_link_style/_version.py (__version__): Update variable.
* mdl_style.py (LSMarkdown.parse): Update method.
-rw-r--r-- | markdown_link_style/_version.py | 2 | ||||
-rw-r--r-- | mdl_style.py | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/markdown_link_style/_version.py b/markdown_link_style/_version.py index 3c3eadb..7355fde 100644 --- a/markdown_link_style/_version.py +++ b/markdown_link_style/_version.py @@ -18,4 +18,4 @@ # along with markdown-link-style (see COPYING). If not, see # <http://www.gnu.org/licenses/>. -__version__ = '0.1.0.dev4' +__version__ = '0.1.0.dev5' diff --git a/mdl_style.py b/mdl_style.py index 8ed6e92..37b6664 100644 --- a/mdl_style.py +++ b/mdl_style.py @@ -181,7 +181,7 @@ class LSRenderer(Renderer): for ref in self.fn_lnk_refs: refs += '{}\n'.format(ref) - # empty fn_lnk_refs + # Empty fn_lnk_refs self.fn_lnk_refs = [] return refs @@ -204,8 +204,14 @@ class LSMarkdown(Markdown): super(LSMarkdown, self).__init__(renderer, inline, block, **kwargs) def parse(self, text): + # Reset footnote link variables. + self.renderer.fn_lnk_num = 0 + self.renderer.fn_lnk_refs = [] + + # Parse text. out = super(LSMarkdown, self).parse(text) + # Spit out. return out.lstrip('\n') |