Skip to content

Commit 3eec437

Browse files
author
Anselm Kruis
committed
Stackless issue python#285: Fix Sphinx warning in tasklets.rst
Fix "tasklets.rst:254: WARNING: Could not lex literal_block as "python3". Highlighting skipped."
1 parent b983d73 commit 3eec437

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Doc/library/stackless/tasklets.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,24 @@ The ``tasklet`` class
263263
t3 id=36413872, next.id=36413744, main.id=36413680, main.scheduled=False
264264
t1 id=36413744, next.id=36413808, main.id=36413680, main.scheduled=False
265265
...
266-
Traceback (most recent call last):
266+
Traceback (most recent call last):
267267
File "<stdin>", line 1, in <module>
268268
File "<stdin>", line 6, in f
269269
KeyboardInterrupt
270270
>>>
271271

272+
..
273+
Note, the previous doctest block looks syntactically incorrect, because
274+
it ends with an empty prompt ``>>>``. Usually this causes the following
275+
warning::
276+
277+
WARNING: Could not lex literal_block as "python3". Highlighting skipped.
278+
279+
To avoid this warning I added a Unicode ZWSP \u200b in front of the word
280+
``Traceback``. Please do not remove this character.
281+
272282
What you see here is that the main tasklet was removed from the scheduler.
273-
Therefore the scheduler runs until it got interrupted by a keyboard interrupt.
283+
Therefore the scheduler ran until it got interrupted by a keyboard interrupt.
274284

275285
.. method:: tasklet.raise_exception(exc_class, *args)
276286

0 commit comments

Comments
 (0)