Skip to content

Commit ad85de8

Browse files
Merge pull request #314 from adamtheturtle/rest-example-update
Fix a few nits with the sample
2 parents eaeddf2 + 883cbc6 commit ad85de8

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

sample/index.rst

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,9 @@ Heading 1 with *bold*
33

44
.. contents::
55

6-
.. rest-example::
7-
8-
.. toctree::
96

10-
other
11-
12-
Comment Support
13-
~~~~~~~~~~~~~~~~
7+
Comments
8+
~~~~~~~~
149

1510
.. rest-example::
1611

@@ -325,21 +320,32 @@ This is useful for documentation that demonstrates how to write reStructuredText
325320

326321
.. rest-example::
327322

328-
.. code-block:: python
323+
.. rest-example::
324+
325+
.. code-block:: python
329326
330-
"""Python code."""
327+
"""Python code."""
331328
332329
333-
def greet(name: str) -> str:
334-
"""Return a greeting message."""
335-
return f"Hello, {name}!"
330+
def greet(name: str) -> str:
331+
"""Return a greeting message."""
332+
return f"Hello, {name}!"
336333
337334
338-
greet(name="World")
335+
greet(name="World")
339336
340337
Embed Blocks
341338
~~~~~~~~~~~~
342339

343340
Embed blocks can be created using the `sphinx-iframes <https://pypi.org/project/sphinx-iframes/>`_ extension.
344341

345342
.. iframe:: https://www.youtube.com/embed/dQw4w9WgXcQ
343+
344+
Sphinx ``toctree``\s are hidden
345+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
346+
347+
.. rest-example::
348+
349+
.. toctree::
350+
351+
other

0 commit comments

Comments
 (0)