Skip to content

Commit 747bf42

Browse files
committed
fix: Respect data_render_debug
1 parent ec8d385 commit 747bf42

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/sphinxnotes/data/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010
from typing import TYPE_CHECKING
1111

1212
if TYPE_CHECKING:
13+
from typing import ClassVar
1314
from sphinx.application import Sphinx
1415
from sphinx.config import Config as SphinxConfig
1516

1617

1718
class Config:
1819
"""Global config of extension."""
1920

20-
render_debug: bool
21+
render_debug: ClassVar[bool]
2122

2223

2324
def _config_inited(app: Sphinx, config: SphinxConfig) -> None:

src/sphinxnotes/data/render/datanodes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
find_current_document,
1616
find_nearest_block_element,
1717
)
18+
from ..config import Config
1819

1920
if TYPE_CHECKING:
2021
from typing import Any
@@ -122,7 +123,7 @@ def render(self, host: Host) -> rendered_data:
122123
# 4. Add rendered nodes to container.
123124
rendered += ns
124125

125-
if self.template.debug:
126+
if self.template.debug or Config.render_debug:
126127
rendered += report
127128

128129
# Clear all empty reports before returning.

0 commit comments

Comments
 (0)