diff --git a/pdoc/html_helpers.py b/pdoc/html_helpers.py index 9e213153..deac0064 100644 --- a/pdoc/html_helpers.py +++ b/pdoc/html_helpers.py @@ -289,7 +289,7 @@ def _admonition(match, module=None, limit_types=None): '\n': ' ', '[': '\\[', ']': '\\]'})).strip() - return f'{indent}![{alt_text}]({value})\n' + return f'{indent}![{alt_text}]({value}){{: loading=lazy}}\n' if type == 'math': return _ToMarkdown.indent(indent, f'\\[ {text.strip()} \\]', diff --git a/pdoc/test/__init__.py b/pdoc/test/__init__.py index 6942b815..a48ecff0 100644 --- a/pdoc/test/__init__.py +++ b/pdoc/test/__init__.py @@ -1571,13 +1571,13 @@ def test_reST_directives(self):
Example
Image shows something.
- +Note
Can only nest admonitions two levels.
Now you know.
Warning