Skip to content

Allow YAML replacements for embedded documentation code examples - #338

Open
virtuald wants to merge 3 commits into
mainfrom
python-doc-code-blocks
Open

virtuald wants to merge 3 commits into
mainfrom
python-doc-code-blocks

Conversation

@virtuald

Copy link
Copy Markdown
Member

Add doc_code_blocks to replace C++ examples with Python without duplicating surrounding documentation:

 classes:
   Timer:
     methods:
       CreateStarted:
         doc_code_blocks:
           - |
             timer = Timer()
             timer.start()
  • Replace blocks in source order with strict count validation.
  • Support null to preserve a block and [] to disable inherited replacements.
  • Support classes, methods, overloads, functions, properties, enums, and enum values.
  • Preserve parameter renaming and doc_append; reject conflicting full-doc overrides.
  • Require sphinxify ≥ 0.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant