File tree Expand file tree Collapse file tree 3 files changed +2
-14
lines changed Expand file tree Collapse file tree 3 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -215,21 +215,13 @@ Please specify a ``type`` in :rst:dir:`autolink-examples`:
215215
216216 Doctest code blocks
217217-------------------
218- Using the ``sphinx.ext.doctest `` extension for code examples requires
219- setting up :confval: `codeautolink_custom_blocks `.
220- To help in that, :func: `clean_pycon <sphinx_codeautolink.clean_pycon> `
221- is provided as a ready-made transformer.
222-
223- .. code :: python
218+ Using the ``sphinx.ext.doctest `` extension for code examples only requires
219+ activating the extension::
224220
225221 extensions = [
226222 ...,
227223 "sphinx.ext.doctest",
228224 ]
229- codeautolink_custom_blocks = {
230- " python3" : None ,
231- " pycon3" : " sphinx_codeautolink.clean_pycon" ,
232- }
233225
234226``doctest `` and ``testcode `` blocks now work as expected.
235227However, any test setup and teardown code is not taken into account.
Original file line number Diff line number Diff line change 44test_project.Foo
55test_project.Foo
66# split
7- from sphinx_codeautolink.extension.block import clean_pycon
87extensions.append("sphinx.ext.doctest")
9- codeautolink_custom_blocks = {"pycon3": clean_pycon}
10- suppress_warnings = ["config.cache"]
118# split
129Test project
1310============
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ test_project.Foo
55test_project.Foo
66# split
77extensions.append("sphinx.ext.doctest")
8- codeautolink_custom_blocks = {"python3": None}
98# split
109Test project
1110============
You can’t perform that action at this time.
0 commit comments