File tree Expand file tree Collapse file tree 6 files changed +49
-11
lines changed
src/RestructuredText/TextRoles Expand file tree Collapse file tree 6 files changed +49
-11
lines changed Original file line number Diff line number Diff line change 2121use function preg_match ;
2222use function trim ;
2323
24+ /**
25+ * Role to create an abbreviation.
26+ *
27+ * Example:
28+ *
29+ * ```rest
30+ * :abbreviation:`term (some term definition)`
31+ * ```
32+ */
2433final class AbbreviationTextRole extends BaseTextRole
2534{
2635 protected string $ name = 'abbreviation ' ;
Original file line number Diff line number Diff line change 1717use phpDocumentor \Guides \Nodes \Inline \DocReferenceNode ;
1818use phpDocumentor \Guides \RestructuredText \Parser \Interlink \InterlinkParser ;
1919
20+ /**
21+ * Role to create a reference to a document.
22+ *
23+ * Example:
24+ *
25+ * ```rest
26+ * :doc:`doc/index`
27+ * ```
28+ */
2029final class DocReferenceTextRole extends AbstractReferenceTextRole
2130{
2231 final public const NAME = 'doc ' ;
Original file line number Diff line number Diff line change 1515
1616use phpDocumentor \Guides \Nodes \SectionNode ;
1717
18+ /**
19+ * Role to create references to link targets.
20+ *
21+ * Example:
22+ *
23+ * ```rest
24+ * :ref:`label`
25+ * ```
26+ */
1827final class GenericLinkProvider
1928{
2029 /** @var array<string, string> */
Original file line number Diff line number Diff line change 1616use phpDocumentor \Guides \Nodes \Inline \GenericTextRoleInlineNode ;
1717use phpDocumentor \Guides \RestructuredText \Parser \DocumentParserContext ;
1818
19+ /**
20+ * Role to create a literal block.
21+ *
22+ * A literal block is a block of text that is displayed as-is, without any formatting.
23+ *
24+ * Example:
25+ *
26+ * ```rest
27+ * :literal:`code`
28+ * ```
29+ */
1930final class LiteralTextRole extends BaseTextRole
2031{
2132 protected string $ name = 'literal ' ;
Original file line number Diff line number Diff line change 1616use phpDocumentor \Guides \Nodes \Inline \GenericTextRoleInlineNode ;
1717use phpDocumentor \Guides \RestructuredText \Parser \DocumentParserContext ;
1818
19+ /**
20+ * Role to create a math block.
21+ *
22+ * A math block is a block of text that is displayed as-is, without any formatting.
23+ *
24+ * Example:
25+ *
26+ * ```rest
27+ * :math:`code`
28+ * ```
29+ */
1930final class MathTextRole extends BaseTextRole
2031{
2132 protected string $ name = 'math ' ;
Original file line number Diff line number Diff line change 1616use phpDocumentor \Guides \Nodes \Inline \GenericTextRoleInlineNode ;
1717use phpDocumentor \Guides \RestructuredText \Parser \DocumentParserContext ;
1818
19- /**
20- * This text role is extended by custom text roles that do not feature a base text role:
21- *
22- * ```
23- * .. role:: custom
24- * :class: special
25- *
26- * :custom:`interpreted text`
27- *
28- * ```
29- */
3019final class SpanTextRole extends BaseTextRole
3120{
3221 protected string $ name = 'span ' ;
You can’t perform that action at this time.
0 commit comments