Skip to main content

sphinx_ultra/doctree/
kinds.rs

1//! docutils element tagnames.
2//!
3//! Names ARE the wire format: `pformat` prints them and the differential
4//! fixture (tests/fixtures/doctree_differential.json) compares them
5//! byte-for-byte against docutils 0.22.4 output. Later waves append consts;
6//! never rename one without regenerating the fixture.
7
8/// Sentinel kind for text leaves; never printed as a tag.
9pub const TEXT: &str = "#text";
10
11pub const DOCUMENT: &str = "document";
12pub const SECTION: &str = "section";
13pub const TITLE: &str = "title";
14pub const PARAGRAPH: &str = "paragraph";
15pub const TRANSITION: &str = "transition";
16pub const BULLET_LIST: &str = "bullet_list";
17pub const ENUMERATED_LIST: &str = "enumerated_list";
18pub const LIST_ITEM: &str = "list_item";
19pub const DEFINITION_LIST: &str = "definition_list";
20pub const DEFINITION_LIST_ITEM: &str = "definition_list_item";
21pub const TERM: &str = "term";
22pub const CLASSIFIER: &str = "classifier";
23pub const DEFINITION: &str = "definition";
24pub const BLOCK_QUOTE: &str = "block_quote";
25pub const ATTRIBUTION: &str = "attribution";
26pub const LITERAL_BLOCK: &str = "literal_block";
27pub const DOCTEST_BLOCK: &str = "doctest_block";
28pub const LINE_BLOCK: &str = "line_block";
29pub const LINE: &str = "line";
30pub const COMMENT: &str = "comment";
31pub const TARGET: &str = "target";
32pub const SYSTEM_MESSAGE: &str = "system_message";
33
34// wave 2: inline nodes
35pub const EMPHASIS: &str = "emphasis";
36pub const STRONG: &str = "strong";
37pub const LITERAL: &str = "literal";
38pub const PROBLEMATIC: &str = "problematic";
39pub const REFERENCE: &str = "reference";
40pub const TITLE_REFERENCE: &str = "title_reference";
41pub const FOOTNOTE_REFERENCE: &str = "footnote_reference";
42pub const CITATION_REFERENCE: &str = "citation_reference";
43pub const SUBSTITUTION_REFERENCE: &str = "substitution_reference";
44pub const SUBSCRIPT: &str = "subscript";
45pub const SUPERSCRIPT: &str = "superscript";
46pub const ABBREVIATION: &str = "abbreviation";
47pub const ACRONYM: &str = "acronym";
48pub const MATH: &str = "math";
49
50// wave 2: footnotes/citations
51pub const FOOTNOTE: &str = "footnote";
52pub const CITATION: &str = "citation";
53pub const LABEL: &str = "label";
54pub const FIELD_LIST: &str = "field_list";
55pub const FIELD: &str = "field";
56pub const FIELD_NAME: &str = "field_name";
57pub const FIELD_BODY: &str = "field_body";
58pub const OPTION_LIST: &str = "option_list";
59pub const OPTION_LIST_ITEM: &str = "option_list_item";
60pub const OPTION_GROUP: &str = "option_group";
61pub const OPTION: &str = "option";
62pub const OPTION_STRING: &str = "option_string";
63pub const OPTION_ARGUMENT: &str = "option_argument";
64pub const DESCRIPTION: &str = "description";
65// wave 3: directives
66pub const SUBTITLE: &str = "subtitle";
67
68pub const IMAGE: &str = "image";
69
70// sphinx-only element names (sphinx/addnodes.py). They print through the
71// same pformat path as the docutils ones; the oracle fixtures pin them.
72pub const COMPACT_PARAGRAPH: &str = "compact_paragraph";
73pub const COMPOUND: &str = "compound";
74pub const ONLY: &str = "only";
75pub const PENDING_XREF: &str = "pending_xref";
76pub const TOCTREE: &str = "toctree";
77
78pub const TABLE: &str = "table";
79pub const TGROUP: &str = "tgroup";
80pub const COLSPEC: &str = "colspec";
81pub const THEAD: &str = "thead";
82pub const TBODY: &str = "tbody";
83pub const ROW: &str = "row";
84pub const ENTRY: &str = "entry";