StrictDoc Documentation
strictdoc/export/rst/rst_templates.py
Source file coverage
Path:
strictdoc/export/rst/rst_templates.py
Lines:
15
Non-empty lines:
12
Non-empty lines covered with requirements:
12 / 12 (100.0%)
Functions:
1
Functions covered by requirements:
1 / 1 (100.0%)
1
from jinja2 import Environment, FileSystemLoader, StrictUndefined
2
 
3
from strictdoc import environment
4
 
5
 
6
class RSTTemplates:
7
    jinja_environment = Environment(
8
        loader=FileSystemLoader(environment.get_path_to_rst_templates()),
9
        undefined=StrictUndefined,
10
    )
11
    # TODO: Check if this line is still needed (might be some older workaround).
12
    jinja_environment.globals.update(isinstance=isinstance)
13
    jinja_environment.trim_blocks = False
14
    jinja_environment.lstrip_blocks = False
15
    jinja_environment.keep_trailing_newline = True