docupy.markdown¶
This module contains for functions for parsing markdown.
-
docupy.markdown.
markdown_to_html
(markdown, paths=None)[source]¶ Takes a string in markdown, and converts it to HTML.
- Parameters
markdown (str) – The maekdown to convert.
paths (dict) – If given, any paths will be replaced using this lookup.
- Return type
str
-
docupy.markdown.
escape_characters
(markdown)[source]¶ Takes some markdown and replaces escaped characters with the substition character. This is returned along with a list of escaped characters.
You cannot escape line breaks - the backslash will be removed but not the line break.
- Parameters
markdown (str) – The string to break up.
- Return type
str
,list
Takes a list of HTML lines and puts p tags around all the lines that need it.
It will also remove empty lines.
- Parameters
lines (list) – the lines to convert.
- Return type
list
Takes a list of HTML lines and puts list tags around all the lines that need it.
- Parameters
lines (list) – the lines to convert.
- Return type
list