1
0
mirror of https://github.com/makeworld-the-better-one/md2gemini synced 2025-04-05 06:19:06 +02:00
md2gemini/tests/test_markdown_link.py
2021-11-20 23:32:41 -05:00

19 lines
347 B
Python

from .util import normalize
from md2gemini import md2gemini
def f(md):
return normalize(md2gemini(md, md_links=True))
def test_markdown_path():
md = "[test](foo.md)"
gem = "=> foo.gmi test"
assert f(md) == gem
def test_markdown_path_anchor():
md = "[test](foo.md#bar)"
gem = "=> foo.gmi test"
assert f(md) == gem