from fastcore.test import *
markdown.markdown.heading
Functions about Markdown headings
heading_level
heading_level (heading_str:str)
Return the level of the heading string.
Type | Details | |
---|---|---|
heading_str | str | A str representing a markdown heading. Starts with 1 to 6 sharps '#' . |
Returns | int | Between 1 and 6, inclusive. |
'## Title'), 2) test_eq(heading_level(
heading_title
heading_title (heading_str:str)
Return the heading title, without the starting sharps.
Type | Details | |
---|---|---|
heading_str | str | A str representing a markdown heading. Starts with 1 to 6 sharps '#' . |
Returns | str |
'# Separable isogeny '), 'Separable isogeny')
test_eq(heading_title('# Test title#'), 'Test title#') test_eq(heading_title(