layerview.common.markdown module
Markdown loading utilities.
- class layerview.common.markdown.MarkdownLoader[source]
Bases:
objectMarkdown document loading abstraction layer.
- _NTFS_ABS_PATH: Pattern = re.compile('^[a-zA-Z]:\\\\(((?![<>:\\"\\/\\\\|?*]).)+((?<![ .])\\\\)?)*$')
- _PATTERN_IMG: Pattern = re.compile('(!\\[.*\\]\\()(.+)(\\))')
- _UNIX_ABS_PATH: Pattern = re.compile('^(?:/[^/\\n]+)*$')
- static _handle_img_paths(md: str, md_parent_dir: Path) str[source]
Make relative Markdown image paths absolute.
- Parameters:
md (str) – Markdown document to process.
md_parent_dir (Path) – Parent dir of the processed Markdown document.
- Returns:
Markdown text with relative image paths converted to absolute.
- Return type:
str