markdown-link-style

switch between inline and footnote link style in markdown documents.
git clone git://git.ricketyspace.net/markdown-link-style.git
Log | Files | Refs

commit aab16fc524986e0c70afb2d5b8ddbf5fc79e1e0b
parent 6fbea4b886aefcc6830c7abe9dcda2f99a200674
Author: rsiddharth <s@ricketyspace.net>
Date:   Sat,  4 Mar 2017 07:54:26 +0000

tests: Update `test_mdl_style.TestLSRendererIL` class.

* tests/data/inline_link_style_01-expected.md: New file.
* tests/data/inline_link_style_01.md: New file.
* tests/test_mdl_style.py
(TestLSRendererIL.test_link_footnote_to_inline_style_conversion_01): Add method.

Diffstat:
tests/data/inline_link_style_01-expected.md | 12++++++++++++
tests/data/inline_link_style_01.md | 19+++++++++++++++++++
tests/test_mdl_style.py | 5+++++
3 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/tests/data/inline_link_style_01-expected.md b/tests/data/inline_link_style_01-expected.md @@ -0,0 +1,12 @@ +This is [an example](http://example.com/ "Title") inline link. + +[This link](http://example.net/) has no title attribute. + +See my [About](/about/) page for details. + +Sed faucibus convallis [an example](http://example.com/ "Optional Title Here") justo et congue link. + +Iaculis purus sed [an example](http://example.com/ "Optional Title Here") porttitor id link. + +There were [foo00](http://example.com/foo/00 "Foo 00 Title") and [foo01](http://example.com/foo/01 "Foo 01 Title") in the +bar. diff --git a/tests/data/inline_link_style_01.md b/tests/data/inline_link_style_01.md @@ -0,0 +1,19 @@ +This is [an example](http://example.com/ "Title") inline link. + +[This link](http://example.net/) has no title attribute. + +See my [About][] page for details. + +[About]: /about/ + +Sed faucibus convallis [an example][id] justo et congue link. + +Iaculis purus sed [an example] [id] porttitor id link. + +[id]: http://example.com/ "Optional Title Here" + +There were [foo00][foo-00] and [foo01][foo-01] in the +bar. + +[foo-00]: http://example.com/foo/00 "Foo 00 Title" +[foo-01]: http://example.com/foo/01 (Foo 01 Title) diff --git a/tests/test_mdl_style.py b/tests/test_mdl_style.py @@ -47,6 +47,11 @@ class TestLSRendererIL(object): expected_result = _get_data('inline_link_style_00-expected.md') assert_equal(self.md(d), expected_result) + def test_link_footnote_to_inline_style_conversion_01(self): + d = _get_data('inline_link_style_01.md') + expected_result = _get_data('inline_link_style_01-expected.md') + assert_equal(self.md(d), expected_result) + def test_renderer_parses_images_00(self): d = _get_data('inline_parses_images_00.md') expected_result = _get_data('inline_parses_images_00-expected.md')