File tree 3 files changed +2
-14
lines changed
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`:
215
215
216
216
Doctest code blocks
217
217
-------------------
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::
224
220
225
221
extensions = [
226
222
...,
227
223
"sphinx.ext.doctest",
228
224
]
229
- codeautolink_custom_blocks = {
230
- " python3" : None ,
231
- " pycon3" : " sphinx_codeautolink.clean_pycon" ,
232
- }
233
225
234
226
``doctest `` and ``testcode `` blocks now work as expected.
235
227
However, any test setup and teardown code is not taken into account.
Original file line number Diff line number Diff line change 4
4
test_project.Foo
5
5
test_project.Foo
6
6
# split
7
- from sphinx_codeautolink.extension.block import clean_pycon
8
7
extensions.append("sphinx.ext.doctest")
9
- codeautolink_custom_blocks = {"pycon3": clean_pycon}
10
- suppress_warnings = ["config.cache"]
11
8
# split
12
9
Test project
13
10
============
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ test_project.Foo
5
5
test_project.Foo
6
6
# split
7
7
extensions.append("sphinx.ext.doctest")
8
- codeautolink_custom_blocks = {"python3": None}
9
8
# split
10
9
Test project
11
10
============
You can’t perform that action at this time.
0 commit comments