Skip to content

Commit ed5777d

Browse files
committed
docs-format: Fixed noextract / skip flag
Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
1 parent f6d5cd2 commit ed5777d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cfengine_cli/docs.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ def _markdown_code_checker(
218218
language = supported_languages[code_block["language"]]
219219
snippet_path = f"{origin_path}.snippet-{i + 1}.{language}"
220220

221-
if extract and "noextract" not in code_block["flags"]:
221+
flags = code_block["flags"]
222+
if "noextract" in flags or "skip" in flags:
223+
# code block was marked to be skipped
224+
continue
225+
if extract:
222226
fn_extract(
223227
origin_path,
224228
snippet_path,

0 commit comments

Comments
 (0)