File tree Expand file tree Collapse file tree 11 files changed +116
-80
lines changed
docs/reference/restructuredtext
packages/guides-restructured-text/src/RestructuredText/Directives Expand file tree Collapse file tree 11 files changed +116
-80
lines changed Original file line number Diff line number Diff line change 4
4
Admonitions
5
5
===========
6
6
7
- The following directives are called "admonitions".
8
- You can use them to point out additional or important information .
7
+ Admonitions are blocks of text that are rendered in a special way to draw attention to them. They are often used to
8
+ provide additional information to the reader about the content that is being discussed .
9
9
10
10
Examples
11
11
========
12
12
13
+ .. index :: reST directives; seealso
14
+
13
15
.. phpdoc :class-list :: [?(@.inheritedElement == "\phpDocumentor\Guides\RestructuredText\Directives\AbstractAdmonitionDirective")]
14
16
15
17
.. phpdoc :name ::
16
18
.. phpdoc :summary ::
17
-
18
-
19
-
20
-
21
- .. index :: reST directives; seealso
22
-
23
- See also
24
- --------
25
-
26
- .. code-block :: rest
27
-
28
- .. seealso::
29
- `Admonitions <http://docutils.sourceforge.net/0.7/docs/ref/rst/directives.html#admonitions>`__
30
-
31
- .. seealso ::
32
- `Admonitions <http://docutils.sourceforge.net/0.7/docs/ref/rst/directives.html#admonitions >`__
33
-
34
-
35
- .. index :: reST directives; note
36
-
37
- Note
38
- ----
39
-
40
- .. code-block :: rest
41
-
42
- .. note::
43
- A note
44
-
45
- .. note ::
46
- A note
47
-
48
-
49
- .. index :: reST directives; tip
50
-
51
- Tip
52
- ---
53
-
54
- .. code-block :: rest
55
-
56
- .. tip::
57
- A tip
58
-
59
- .. tip ::
60
- A tip
61
-
62
- You may also use the admonition **hint **, but this is very similar
63
- and **tip ** is more commonly used in the documentation.
64
-
65
- .. index :: reST directives; warning
66
-
67
- Warning
68
- -------
69
-
70
- .. code-block :: rest
71
-
72
- .. warning::
73
- Some text pointing out something that people should be warned about.
74
-
75
- .. warning ::
76
- Some text pointing out something that people should be warned about.
77
-
78
- You may also use the admonitions **caution ** or even **danger ** if the
79
- severity of the warning must be stressed.
80
-
81
-
82
- .. index :: reST directives; attention
83
-
84
- Attention
85
- ---------
86
-
87
- .. code-block :: rest
88
-
89
- .. attention::
90
- A attention
91
-
92
- .. attention ::
93
- A attention
19
+ .. phpdoc :description ::
Original file line number Diff line number Diff line change 15
15
16
16
use phpDocumentor \Guides \RestructuredText \Parser \Productions \Rule ;
17
17
18
+ /**
19
+ * Directive to create an attention admonition.
20
+ *
21
+ * Example:
22
+ *
23
+ * ```rest
24
+ * .. attention::
25
+ *
26
+ * This is an attention admonition.
27
+ * ```
28
+ */
18
29
final class AttentionDirective extends AbstractAdmonitionDirective
19
30
{
20
31
public function __construct (protected Rule $ startingRule )
Original file line number Diff line number Diff line change 15
15
16
16
use phpDocumentor \Guides \RestructuredText \Parser \Productions \Rule ;
17
17
18
+ /**
19
+ * Directive to create a caution admonition.
20
+ *
21
+ * Example:
22
+ *
23
+ * ```rest
24
+ * .. caution::
25
+ *
26
+ * This is a caution admonition.
27
+ * ```
28
+ */
18
29
final class CautionDirective extends AbstractAdmonitionDirective
19
30
{
20
31
public function __construct (protected Rule $ startingRule )
Original file line number Diff line number Diff line change 15
15
16
16
use phpDocumentor \Guides \RestructuredText \Parser \Productions \Rule ;
17
17
18
- final class DangerDirective extends AbstractAdmonitionDirective
18
+ /**
19
+ * Directive to create a danger admonition.
20
+ *
21
+ * Example:
22
+ *
23
+ * ```rest
24
+ * .. danger::
25
+ *
26
+ * This is a danger admonition.
27
+ * ```
28
+ */
29
+ class DangerDirective extends AbstractAdmonitionDirective
19
30
{
20
31
public function __construct (protected Rule $ startingRule )
21
32
{
Original file line number Diff line number Diff line change 15
15
16
16
use phpDocumentor \Guides \RestructuredText \Parser \Productions \Rule ;
17
17
18
+ /**
19
+ * Directive to create a error admonition.
20
+ *
21
+ * Example:
22
+ *
23
+ * ```rest
24
+ * .. error::
25
+ *
26
+ * This is an error admonition.
27
+ * ```
28
+ */
18
29
final class ErrorDirective extends AbstractAdmonitionDirective
19
30
{
20
31
public function __construct (protected Rule $ startingRule )
Original file line number Diff line number Diff line change 15
15
16
16
use phpDocumentor \Guides \RestructuredText \Parser \Productions \Rule ;
17
17
18
+ /**
19
+ * Directive to create a hint admonition.
20
+ *
21
+ * Example:
22
+ *
23
+ * ```rest
24
+ * .. hint::
25
+ *
26
+ * This is a hint admonition.
27
+ * ```
28
+ */
18
29
final class HintDirective extends AbstractAdmonitionDirective
19
30
{
20
31
public function __construct (protected Rule $ startingRule )
Original file line number Diff line number Diff line change 15
15
16
16
use phpDocumentor \Guides \RestructuredText \Parser \Productions \Rule ;
17
17
18
+ /**
19
+ * Directive to create a important admonition.
20
+ *
21
+ * Example:
22
+ *
23
+ * ```rest
24
+ * .. important::
25
+ *
26
+ * This is a important admonition.
27
+ * ```
28
+ */
18
29
final class ImportantDirective extends AbstractAdmonitionDirective
19
30
{
20
31
public function __construct (protected Rule $ startingRule )
Original file line number Diff line number Diff line change 15
15
16
16
use phpDocumentor \Guides \RestructuredText \Parser \Productions \Rule ;
17
17
18
+ /**
19
+ * Directive to create a note admonition.
20
+ *
21
+ * Example:
22
+ *
23
+ * ```rest
24
+ * .. note::
25
+ *
26
+ * This is a note admonition.
27
+ * ```
28
+ */
18
29
final class NoteDirective extends AbstractAdmonitionDirective
19
30
{
20
31
public function __construct (protected Rule $ startingRule )
Original file line number Diff line number Diff line change 15
15
16
16
use phpDocumentor \Guides \RestructuredText \Parser \Productions \Rule ;
17
17
18
+ /**
19
+ * Directive to create a seealso admonition.
20
+ *
21
+ * Example:
22
+ *
23
+ * ```rest
24
+ * .. seealso::
25
+ *
26
+ * This is a seealso admonition.
27
+ * ```
28
+ */
18
29
final class SeeAlsoDirective extends AbstractAdmonitionDirective
19
30
{
20
31
public function __construct (protected Rule $ startingRule )
Original file line number Diff line number Diff line change 15
15
16
16
use phpDocumentor \Guides \RestructuredText \Parser \Productions \Rule ;
17
17
18
+ /**
19
+ * Directive to create a tip admonition.
20
+ *
21
+ * Example:
22
+ *
23
+ * ```rest
24
+ * .. tip::
25
+ *
26
+ * This is a tip admonition.
27
+ * ```
28
+ */
18
29
final class TipDirective extends AbstractAdmonitionDirective
19
30
{
20
31
public function __construct (protected Rule $ startingRule )
You can’t perform that action at this time.
0 commit comments