Skip to content

Commit f7f41e6

Browse files
committed
Fix and standardise markup
1 parent 3dd10e4 commit f7f41e6

File tree

6 files changed

+64
-21
lines changed

6 files changed

+64
-21
lines changed

doc/usage/domains/c.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ The C domain (name **c**) is suited for documentation of C API.
5959
..
6060
** for some editors (e.g., vim) to stop bold-highlighting the source
6161
62+
:no-contents-entry:
63+
:no-index-entry:
6264
:param type: description of the first parameter.
6365
:param nitems: description of the second parameter.
6466
:returns: a result.
@@ -224,7 +226,12 @@ The following directive can be used for this purpose.
224226
becomes
225227
226228
.. c:var:: int data
229+
:no-contents-entry:
230+
:no-index-entry:
231+
227232
.. c:function:: int f(double k)
233+
:no-contents-entry:
234+
:no-index-entry:
228235
229236
.. c:alias:: data
230237
f

doc/usage/domains/cpp.rst

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ visibility statement (``public``, ``private`` or ``protected``).
230230
This will render as follows:
231231

232232
.. cpp:concept:: template<typename It> std::Iterator
233+
:no-contents-entry:
234+
:no-index-entry:
233235

234236
Proxy to an element of a notional sequence that can be compared,
235237
indirected, or incremented.
@@ -623,11 +625,21 @@ As example, consider the following class declaration:
623625

624626
.. cpp:namespace-push:: overload_example
625627
.. cpp:class:: C
628+
:no-contents-entry:
629+
:no-index-entry:
626630

627631
.. cpp:function:: void f(double d) const
632+
:no-contents-entry:
633+
:no-index-entry:
628634
.. cpp:function:: void f(double d)
635+
:no-contents-entry:
636+
:no-index-entry:
629637
.. cpp:function:: void f(int i)
638+
:no-contents-entry:
639+
:no-index-entry:
630640
.. cpp:function:: void f()
641+
:no-contents-entry:
642+
:no-index-entry:
631643

632644
References using the :rst:role:`cpp:func` role:
633645

@@ -651,12 +663,18 @@ Templated declarations
651663
Assume the following declarations.
652664

653665
.. cpp:class:: Wrapper
666+
:no-contents-entry:
667+
:no-index-entry:
654668

655669
.. cpp:class:: template<typename TOuter> \
656670
Outer
671+
:no-contents-entry:
672+
:no-index-entry:
657673

658674
.. cpp:class:: template<typename TInner> \
659675
Inner
676+
:no-contents-entry:
677+
:no-index-entry:
660678

661679
In general the reference must include the template parameter declarations,
662680
and template arguments for the prefix of qualified names. For example:
@@ -689,18 +707,28 @@ Assume the following declarations.
689707

690708
.. cpp:class:: template<typename TOuter> \
691709
Outer
710+
:no-contents-entry:
711+
:no-index-entry:
692712

693-
.. cpp:class:: template<typename TInner> \
694-
Inner
713+
.. cpp:class:: template<typename TInner> \
714+
Inner
715+
:no-contents-entry:
716+
:no-index-entry:
695717

696718
.. cpp:class:: template<> \
697719
Outer<int>
720+
:no-contents-entry:
721+
:no-index-entry:
698722

699-
.. cpp:class:: template<typename TInner> \
700-
Inner
723+
.. cpp:class:: template<typename TInner> \
724+
Inner
725+
:no-contents-entry:
726+
:no-index-entry:
701727

702-
.. cpp:class:: template<> \
703-
Inner<bool>
728+
.. cpp:class:: template<> \
729+
Inner<bool>
730+
:no-contents-entry:
731+
:no-index-entry:
704732

705733
In general the reference must include a template parameter list for each
706734
template argument list. The full specialisation above can therefore be
@@ -718,6 +746,8 @@ Assume the following declaration.
718746

719747
.. cpp:class:: template<typename T> \
720748
Outer<T*>
749+
:no-contents-entry:
750+
:no-index-entry:
721751

722752
References to partial specialisations must always include the template
723753
parameter lists, e.g., ``template\<typename T> Outer\<T*>``

doc/usage/domains/javascript.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ The JavaScript domain (name **js**) provides the following directives:
4848
This is rendered as:
4949

5050
.. js:function:: $.getJSON(href, callback[, errback])
51-
:no-index:
51+
:no-contents-entry:
52+
:no-index-entry:
5253

5354
:param string href: An URI to the location of the resource.
5455
:param callback: Gets called with the object.
@@ -96,7 +97,8 @@ The JavaScript domain (name **js**) provides the following directives:
9697
This is rendered as:
9798

9899
.. js:class:: MyAnimal(name[, age])
99-
:no-index:
100+
:no-contents-entry:
101+
:no-index-entry:
100102

101103
:param string name: The name of the animal
102104
:param number age: an optional age for the animal
@@ -123,8 +125,8 @@ The JavaScript domain (name **js**) provides the following directives:
123125
These roles are provided to refer to the described objects:
124126

125127
.. rst:role:: js:mod
126-
js:func
127-
js:meth
128-
js:class
129-
js:data
130-
js:attr
128+
js:func
129+
js:meth
130+
js:class
131+
js:data
132+
js:attr

doc/usage/domains/python.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ declarations:
4646
locations then.
4747
4848
49-
5049
.. rst:directive:: .. py:currentmodule:: name
5150
5251
This directive tells Sphinx that the classes, functions etc. documented from
@@ -305,7 +304,7 @@ The following directives are provided for module and class contents:
305304
306305
Indicate the property is a classmethod.
307306
308-
.. versionaddedd: 4.2
307+
.. versionadded:: 4.2
309308
310309
.. rst:directive:option:: type: type of the property
311310
:type: text
@@ -487,7 +486,8 @@ For functions with optional parameters that don't have default values
487486
argument support), you can use brackets to specify the optional parts:
488487

489488
.. py:function:: compile(source[, filename[, symbol]])
490-
:no-index:
489+
:no-contents-entry:
490+
:no-index-entry:
491491

492492
It is customary to put the opening bracket before the comma.
493493

@@ -565,7 +565,8 @@ explained by an example::
565565
This will render like this:
566566

567567
.. py:function:: send_message(sender, recipient, message_body, [priority=1])
568-
:no-index:
568+
:no-contents-entry:
569+
:no-index-entry:
569570

570571
Send a message to a recipient
571572

doc/usage/domains/restructuredtext.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ The reStructuredText domain (name **rst**) provides the following directives:
2525
will be rendered as:
2626

2727
.. rst:directive:: foo
28-
:no-index:
28+
:no-contents-entry:
29+
:no-index-entry:
2930

3031
Foo description.
3132

3233
.. rst:directive:: .. bar:: baz
33-
:no-index:
34+
:no-contents-entry:
35+
:no-index-entry:
3436

3537
Bar description.
3638

@@ -84,7 +86,8 @@ The reStructuredText domain (name **rst**) provides the following directives:
8486
will be rendered as:
8587

8688
.. rst:role:: foo
87-
:no-index:
89+
:no-contents-entry:
90+
:no-index-entry:
8891

8992
Foo description.
9093

doc/usage/domains/standard.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ There is also a very generic object description directive, which is not tied to
8484
any domain:
8585

8686
.. rst:directive:: .. describe:: text
87-
.. object:: text
87+
.. object:: text
8888
8989
This directive produces the same formatting as the specific ones provided by
9090
domains, but does not create index entries or cross-referencing targets.

0 commit comments

Comments
 (0)