danoan.correct_markdown.core.utils module

danoan.correct_markdown.core.utils.extract_html_tags(html: str) List[Tuple[str, int, int]][source]

Parses a html string and extracts all its markup tags.

Each returned item is a triplet (type,start,end)

type:

closing: closing html tag opening: opening html tag no_html: text content

Parameters:

html (str)

Return type:

List[Tuple[str, int, int]]

danoan.correct_markdown.core.utils.get_plain_text_from_markdown(markdown_stream: TextIO) str[source]

Removes all markdown markup from a string.

Parameters:

markdown_stream (TextIO)

Return type:

str

danoan.correct_markdown.core.utils.remove_html_tags(string_stream: TextIO) str[source]

Removes all html tags from a string.

Parameters:

string_stream (TextIO)

Return type:

str