pub enum Content<'src> {
Show 26 variants
Basic(Span<'src>),
Sequence {
source: Span<'src>,
children: Vec<Content<'src>>,
},
NamedCharacterLt(Span<'src>),
NamedCharacterGt(Span<'src>),
NamedCharacterAmp(Span<'src>),
Emphasis {
source: Span<'src>,
content: Box<Content<'src>>,
},
Strong {
source: Span<'src>,
content: Box<Content<'src>>,
},
Monospace {
source: Span<'src>,
content: Box<Content<'src>>,
},
Superscript {
source: Span<'src>,
content: Box<Content<'src>>,
},
Subscript {
source: Span<'src>,
content: Box<Content<'src>>,
},
DoubleCurvedQuotes {
source: Span<'src>,
content: Box<Content<'src>>,
},
SingleCurvedQuotes {
source: Span<'src>,
content: Box<Content<'src>>,
},
AttributeValue {
source: Span<'src>,
value: Box<Content<'src>>,
},
TextSymbolCopyright(Span<'src>),
TextSymbolRegistered(Span<'src>),
TextSymbolTrademark(Span<'src>),
TextSymbolEmDash(Span<'src>),
TextSymbolEllipsis(Span<'src>),
TextSymbolSingleRightArrow(Span<'src>),
TextSymbolDoubleRightArrow(Span<'src>),
TextSymbolSingleLeftArrow(Span<'src>),
TextSymbolDoubleLeftArrow(Span<'src>),
TextSymbolTypographicApostrophe(Span<'src>),
CharacterReference {
source: Span<'src>,
value: char,
},
Macro {
source: Span<'src>,
content: Box<Content<'src>>,
},
LineBreak(Span<'src>),
}
Expand description
Describes the annotated content of a Span
after any relevant
substitutions have been performed.
This is typically used to represent the main body of block types that don’t
contain other blocks, such as SimpleBlock
or RawDelimitedBlock
.
Variants§
Basic(Span<'src>)
The content of this Span
should be passed through without further
interpretation.
Sequence
Represents a series of Content
items of varying types.
Fields
NamedCharacterLt(Span<'src>)
The less-than symbol, <
, is replaced (in HTML output) with the named
character reference <
.
NamedCharacterGt(Span<'src>)
The greater-than symbol, >
, is replaced (in HTML output) with the
named character reference >
.
NamedCharacterAmp(Span<'src>)
An ampersand, &
, is replaced with the named character reference
&
.
Emphasis
Content wrapped with underscores (e.g., _word_
) are wrapped (in HTML
output) in an <em>
tag.
Fields
Strong
Content wrapped with asterisks (e.g., *word*
) are wrapped (in HTML
output) in a <strong>
tag.
Fields
Monospace
Content wrapped with backticks (e.g., `word`
) are wrapped (in HTML
output) in a <code>
tag.
Fields
Superscript
Content wrapped with up arrows (e.g., ^word^
) are wrapped (in HTML
output) in a <sup>
tag.
Fields
Subscript
Content wrapped with tildes (e.g., ~word~
) are wrapped (in HTML
output) in a <sub>
tag.
Fields
DoubleCurvedQuotes
Content wrapped with a double quote and backtick (e.g., "`word`"
)
are wrapped (in HTML output) in a double curved quote pair (i.e.
“word”
).
Fields
SingleCurvedQuotes
Content wrapped with a single quote and backtick (e.g., '`word`'
)
are wrapped (in HTML output) in single curved quote pair (i.e.
‘word’
).
Fields
AttributeValue
Attribute references are replaced with the values of the attribute they
reference when processed by the attributes
substitution step. Such
values may be subject to further substitutions.
Fields
TextSymbolCopyright(Span<'src>)
The character sequence (C)
is replaced (in HTML output) with the named
character reference ©
.
TextSymbolRegistered(Span<'src>)
The character sequence (R)
is replaced (in HTML output) with the named
character reference ®
.
TextSymbolTrademark(Span<'src>)
The character sequence (TM)
is replaced (in HTML output) with the
named character reference ™
.
TextSymbolEmDash(Span<'src>)
The character sequence --
is replaced (in HTML output) with the named
character reference —
, but only if between two word characters,
between a word character and a line boundary, or flanked by spaces. When
flanked by space characters (e.g., a -- b
), the normal spaces are
replaced by thin spaces ( 
). Otherwise, the em dash is followed
by a zero-width space (​
) to provide a break opportunity.
TextSymbolEllipsis(Span<'src>)
The character sequence ...
is replaced (in HTML output) with the named
character reference ⃮
. The ellipsis is followed by a zero-width
space (​
) to provide a break opportunity.
TextSymbolSingleRightArrow(Span<'src>)
The character sequence ->
is replaced (in HTML output) with the named
character reference →
.
TextSymbolDoubleRightArrow(Span<'src>)
The character sequence =>
is replaced (in HTML output) with the named
character reference ⇒
.
TextSymbolSingleLeftArrow(Span<'src>)
The character sequence <-
is replaced (in HTML output) with the named
character reference ←
.
TextSymbolDoubleLeftArrow(Span<'src>)
The character sequence <=
is replaced (in HTML output) with the named
character reference ⇐
.
TextSymbolTypographicApostrophe(Span<'src>)
The single typewriter apostrophe '
is replaced (in HTML output) with
the named character reference ’
.
CharacterReference
HTML and XML character references and decimal and hexadecimal Unicode code points are replaced with their corresponding decimal form Unicode code point.
Fields
Macro
The content of any inline and block macro are replaced with the appropriate built-in and user-defined configuration.
Fields
LineBreak(Span<'src>)
The line break character, +
, is replaced with (what?).