markdown-textwrap

text wrap markdown documents
git clone git://git.ricketyspace.net/markdown-textwrap.git
Log | Files | Refs

commit fcb40a385d6063118e31fc2f53be1d022d2ce378
parent 98dde38a414d56480dd568de4050bab88ed4b863
Author: rsiddharth <s@ricketyspace.net>
Date:   Mon, 26 Feb 2018 00:19:30 +0000

md_tw.py: [token] def_links -> def_link

* md_tw.py (TWBlockLexer)[parse_def_links]: Update method.
* tests/test_md_tw.py (TWBlockLexer)[test_parse_def_link]:  New test method.
[test_parse_def_links]: Remove test method.

Diffstat:
md_tw.py | 2+-
tests/test_md_tw.py | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/md_tw.py b/md_tw.py @@ -156,7 +156,7 @@ class TWBlockLexer(mistune.BlockLexer): 'title': m.group(3), } self.tokens.append({ - 'type': 'def_links', + 'type': 'def_link', 'text': m.group(0) }) diff --git a/tests/test_md_tw.py b/tests/test_md_tw.py @@ -466,7 +466,7 @@ class TestTWBlockLexer(object): } tokens = process(tokens) - def test_parse_def_links(self): + def test_parse_def_link(self): tokens = self._parse('blexer-def-links.md') expected_dls = [ @@ -481,7 +481,7 @@ class TestTWBlockLexer(object): ' [yahoo]: http://search.yahoo.com/ "Yahoo Search"\n', ' [msn]: http://search.msn.com/ "MSN Search"', ] - self._validate(tokens, 'def_links', expected_dls) + self._validate(tokens, 'def_link', expected_dls) def test_parse_def_footnotes(self): tokens = self._parse('blexer-footnotes.md')