Skip to content

Commit f9c0a13

Browse files
Fixed empty code blocks in included examples
Ticket: ENT-14130 Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
1 parent 50a15f4 commit f9c0a13

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

generator/_scripts/cfdoc_macros.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,10 @@ def include_snippet(parameters, config):
749749
if line.find("#[%-%]") == 0:
750750
skip_block = True
751751
continue
752+
# org-mode src markers are just delimiters, not content. Skip them so they
753+
# don't trip the in_documentation toggle below and open an empty code block.
754+
if line.startswith("#+begin_src") or line.startswith("#+end_src"):
755+
continue
752756
# #@ interrupts code block, interpret documentation in example code
753757
if line.find("#@ ") == 0:
754758
line = line[3:]

0 commit comments

Comments
 (0)