nbsphinx icon indicating copy to clipboard operation
nbsphinx copied to clipboard

Using nbconvert.preprocessors.RegexRemovePreprocessor

Open ratnanil opened this issue 6 years ago • 2 comments

I read @mgeier's answer to a question (#285) regarding the skipping of some cells using a regex. I'm totally at a loss here and and don't know whether I'm look in the right place: But is there a way to use nbconvert.preprocessors.RegexRemovePreprocessor with sphinx /nbsphinx on individual *.ipynb files to skip cells based on a regex? I would be very glad for a pointer!

ratnanil avatar Oct 18 '19 20:10 ratnanil

There is currently no way to specify which preprocessors are to be used.

The HighlightMagicsPreprocessor is hard-coded to be enabled, the RegexRemovePreprocessor is hard-coded to be disabled (but latter is not necessary anymore, because the original problem has been fixed in https://github.com/jupyter/nbconvert/pull/784).

There is currently no way to specify additional preprocessors, but such a feature has been suggested in #305. Feel free to add comments there and feel free to make a PR.

mgeier avatar Oct 19 '19 09:10 mgeier

I forgot: The ExecutePreprocessor is used directly in the nbsphinx source code, without using nbconvert's "config" mechanism.

mgeier avatar Oct 19 '19 09:10 mgeier