Skip to content

Commit fd0a6aa

Browse files
committed
fix rendering of multiple parts in sphinx
1 parent 6b25391 commit fd0a6aa

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

docs/reference.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The first part will just create a file (and error out if it wasn't created).
8383

8484
.. structured-tutorial-part::
8585

86-
The second part will test if ``ncat`` is installed and invoke it in a subshell:
86+
The second part will test if ``ncat`` is installed and call it after a three-second delay:
8787

8888
.. structured-tutorial-part::
8989

docs/tutorials/test-command/tutorial.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ parts:
2020
port: 1234
2121
delay: 2 # wait for three seconds before even trying
2222
retry: 3 # retry up to three times (command will be run up to four times)
23-
backoff_factor: 1 # wait for 0, 5, 10 and 20 seconds between retries
23+
backoff_factor: 1 # wait for 1, 2 and 4 seconds before retries
2424
cleanup:
2525
- command: pkill sleep
2626
- command: pkill ncat

structured_tutorials/sphinx/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,5 @@ def render_part(self) -> str:
8787
text = self.render_code_block(part)
8888
else: # pragma: no cover
8989
raise ValueError("unsupported part type.")
90+
self.next_part += 1
9091
return text

0 commit comments

Comments
 (0)