Skip to content

Support code fences within comments #46

Description

@staadecker

Often it is useful to run some code without having it display in the rendered markdown. Two such cases:

  1. Running some setup code. Yes, fixtures are a workaround but sometimes each file needs its own setup code so it doesn't make sense having a bunch of fixtures in conftest.py.
  2. Running assertions to test our code. Often, these assertions should be hidden from those reading the documentation.

I tried placing the following in my documentation but it isn't being detected?

<!--
```python continuation
assert something == something_else
```
-->

Any workarounds or fixes?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions