keewis / blackdoc

run black on documentation code snippets
https://blackdoc.readthedocs.io
MIT License
47 stars 4 forks source link

Add option to ignore `doctest` comments #171

Open stinodego opened 1 year ago

stinodego commented 1 year ago

Some of my doctests include a # doctest: +SKIP marker. These markers do not show up in the published docs. However, if these markers exceed the black line length, the line will be reformatted.

This leads to an undesirable situation where the docs will contain code that would fit on one line just fine, but are broken up anyway.

I would love a setting that allows me to tell blackdoc to ignore comments that start with doctest: when reformatting.