Skip to main content

Inline

Enum Inline 

Source
pub enum Inline {
    Text(String),
    Link {
        url: Url,
        title: Option<String>,
        children: Vec<Inline>,
        is_wikilink: bool,
    },
    Image {
        src: Url,
        alt: String,
        title: Option<String>,
        is_wikilink: bool,
        wikilink_pothole: Option<String>,
    },
    Emphasis(Vec<Inline>),
    Strong(Vec<Inline>),
    Code(String),
    LineBreak,
    Strikethrough(Vec<Inline>),
    FootnoteRef(String),
    TaskMarker(bool),
    Other(String),
}
Expand description

An inline-level AST node.

Variants§

§

Text(String)

[content](url "title") or [[wikilink]].

is_wikilink preserves pulldown-cmark’s LinkType::WikiLink discriminator at parse time so the renderer can emit class="wikilink" on the <a> tag and downstream consumers (graph builder, link-resolver) can distinguish wikilink targets from standard markdown links. Added Phase 4 PR7a (2026-05-28) as the smallest AST change matching mdast convention (Link node + extension flag, mirroring LinkType::WikiLink as a tag).

Fields

§url: Url
§children: Vec<Inline>
§is_wikilink: bool

True when pulldown-cmark emitted Tag::Link { link_type: LinkType::WikiLink, .. } (i.e. the markdown source was [[target]] or [[target|alias]], post-Stage-1 rewrite). Renderer adds class="wikilink" for true.

§

Image

![alt](src "title") or ![[wikilink]].

is_wikilink + wikilink_pothole (Phase 4 PR7a-flip-core-B, 2026-05-28) preserve pulldown-cmark’s LinkType::WikiLink discriminator and the original pothole text so the dispatch_wikilink_embeds visitor can route ![[v.mp4|width=400]] → per-extension renderer (video / pdf / audio / iframe / 3D / notebook / etc) with the typed params intact. The parser’s Tag::Image arm captures the raw pothole BEFORE PR3.5’s wikilink-alt classification consumes it into the alt field; without preservation, the width=400 token is erased after alt-classification.

is_wikilink: false and wikilink_pothole: None for standard ![alt](src) markdown images.

Fields

§src: Url
§is_wikilink: bool

True when pulldown-cmark emitted Tag::Image { link_type: LinkType::WikiLink, .. } (i.e. the markdown source was ![[target]] / ![[target|pothole]]). Mirrors Inline::Link.is_wikilink.

§wikilink_pothole: Option<String>

Original pothole text (after |) preserved verbatim from the pulldown-cmark text events for wikilink images. None for non-wikilink images and for wikilinks without a pothole (pulldown-cmark synthesizes the dest as text when no pothole is present).

§

Emphasis(Vec<Inline>)

*emphasis*

§

Strong(Vec<Inline>)

**strong**

§

Code(String)

`code`

§

LineBreak

Hard line break.

§

Strikethrough(Vec<Inline>)

~~struck~~

§

FootnoteRef(String)

[^label] — a GFM footnote marker. Carries the author’s label, not the printed number: numbering is first-reference order over the whole document, which is a render-time fact (same rule as ColumnAlignment’s numeric auto-alignment). See ADR-035.

§

TaskMarker(bool)

The [ ] / [x] of a GFM task-list item, carrying its checked state.

Modeled as an INLINE, not as a field on Block::List, because that is where pulldown-cmark puts it: Event::TaskListMarker is the first event inside Tag::Item, ahead of the item’s own content. Keeping it inline leaves Block::List’s shape untouched and avoids a third vector parallel to items / item_source_lines. See ADR-035 § Task lists.

§

Other(String)

Raw inline HTML passthrough (Event::Html / Event::InlineHtml), plus the math node math_text::math_inline synthesizes (ADR-030). NOT a fallback for unmodeled pulldown constructs — see the module doc.

Trait Implementations§

Source§

impl Clone for Inline

Source§

fn clone(&self) -> Inline

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Inline

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Inline

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Inline

Source§

impl PartialEq for Inline

Source§

fn eq(&self, other: &Inline) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Inline

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Inline

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.