markdown_api
trestle.core.markdown.markdown_api
¤
A markdown API.
Attributes¤
logger = logging.getLogger(__name__)
module-attribute
¤
Classes¤
MarkdownAPI
¤
A common API that wraps around the existing markdown functionality.
Source code in trestle/core/markdown/markdown_api.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
Attributes¤
processor = MarkdownProcessor()
instance-attribute
¤
validator = None
instance-attribute
¤
Functions¤
__init__()
¤
Initialize markdown API.
Source code in trestle/core/markdown/markdown_api.py
34 35 36 37 |
|
load_validator_with_template(md_template_path, validate_yaml_header, validate_md_body, governed_section=None, validate_template=False)
¤
Load and initialize markdown validator.
Source code in trestle/core/markdown/markdown_api.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
validate_instance(md_instance_path)
¤
Validate a given markdown instance against a template.
Source code in trestle/core/markdown/markdown_api.py
71 72 73 74 75 76 |
|
write_markdown_with_header(path, header, md_body)
¤
Write markdown with the YAML header.
Source code in trestle/core/markdown/markdown_api.py
78 79 80 81 82 83 84 85 86 87 88 |
|
handler: python