From f9c0a137cf7e6a011217f2c951d73ed38e975882 Mon Sep 17 00:00:00 2001 From: Ihor Aleksandrychiev Date: Mon, 29 Jun 2026 15:19:27 +0300 Subject: [PATCH] Fixed empty code blocks in included examples Ticket: ENT-14130 Signed-off-by: Ihor Aleksandrychiev --- generator/_scripts/cfdoc_macros.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generator/_scripts/cfdoc_macros.py b/generator/_scripts/cfdoc_macros.py index cc7012239..f7ef61b56 100644 --- a/generator/_scripts/cfdoc_macros.py +++ b/generator/_scripts/cfdoc_macros.py @@ -749,6 +749,10 @@ def include_snippet(parameters, config): if line.find("#[%-%]") == 0: skip_block = True continue + # org-mode src markers are just delimiters, not content. Skip them so they + # don't trip the in_documentation toggle below and open an empty code block. + if line.startswith("#+begin_src") or line.startswith("#+end_src"): + continue # #@ interrupts code block, interpret documentation in example code if line.find("#@ ") == 0: line = line[3:]