traitement des urls

This commit is contained in:
François Pelletier 2024-01-12 13:53:17 -05:00
parent 3317bb7de6
commit 9859ec4f63
3 changed files with 24 additions and 7 deletions

View file

@ -3,8 +3,11 @@ from markdown_fix_freeplane.markdown_utils import replace_title_with_list
def test_replace_title_with_list():
assert (replace_title_with_list(
'# This is a title\n# Another title') ==
'- This is a title\n- Another title')
'# This is a title\n# Another title', depth=2) ==
'# This is a title\n# Another title')
assert (replace_title_with_list(
'# This is a title\n## Another title') ==
'- This is a title\n - Another title')
'# This is a title\n## Another title', depth=2) ==
'# This is a title\n- Another title')
assert (replace_title_with_list(
'# This is a title\n## Another title\n### Yet another title', depth=2) ==
'# This is a title\n- Another title\n - Yet another title')