Skip to main content

Extensions

Struct Extensions 

Source
pub struct Extensions {
Show 67 fields pub blank_before_header: bool, pub header_attributes: bool, pub auto_identifiers: bool, pub gfm_auto_identifiers: bool, pub implicit_header_references: bool, pub blank_before_blockquote: bool, pub fancy_lists: bool, pub startnum: bool, pub example_lists: bool, pub task_lists: bool, pub definition_lists: bool, pub backtick_code_blocks: bool, pub fenced_code_blocks: bool, pub fenced_code_attributes: bool, pub executable_code: bool, pub rmarkdown_inline_code: bool, pub quarto_inline_code: bool, pub inline_code_attributes: bool, pub simple_tables: bool, pub multiline_tables: bool, pub grid_tables: bool, pub pipe_tables: bool, pub table_captions: bool, pub fenced_divs: bool, pub native_divs: bool, pub line_blocks: bool, pub intraword_underscores: bool, pub strikeout: bool, pub superscript: bool, pub subscript: bool, pub inline_links: bool, pub reference_links: bool, pub shortcut_reference_links: bool, pub link_attributes: bool, pub autolinks: bool, pub inline_images: bool, pub implicit_figures: bool, pub tex_math_dollars: bool, pub tex_math_gfm: bool, pub tex_math_single_backslash: bool, pub tex_math_double_backslash: bool, pub inline_footnotes: bool, pub footnotes: bool, pub citations: bool, pub bracketed_spans: bool, pub native_spans: bool, pub yaml_metadata_block: bool, pub pandoc_title_block: bool, pub mmd_title_block: bool, pub raw_html: bool, pub markdown_in_html_blocks: bool, pub raw_tex: bool, pub raw_attribute: bool, pub all_symbols_escapable: bool, pub escaped_line_breaks: bool, pub autolink_bare_uris: bool, pub hard_line_breaks: bool, pub mmd_header_identifiers: bool, pub mmd_link_attributes: bool, pub alerts: bool, pub emoji: bool, pub mark: bool, pub quarto_callouts: bool, pub quarto_crossrefs: bool, pub quarto_shortcodes: bool, pub bookdown_references: bool, pub bookdown_equation_references: bool,
}
Expand description

Pandoc/Markdown extensions configuration. Each field represents a specific Pandoc extension. Extensions marked with a comment indicate implementation status.

Fields§

§blank_before_header: bool

Require blank line before headers (default: enabled)

§header_attributes: bool

Full attribute syntax on headers {#id .class key=value}

§auto_identifiers: bool

Auto-generate identifiers from headings

§gfm_auto_identifiers: bool

Use GitHub’s algorithm for auto-generated heading identifiers

§implicit_header_references: bool

Implicit header references ([Heading] links to header)

§blank_before_blockquote: bool

Require blank line before blockquotes (default: enabled)

§fancy_lists: bool

Fancy list markers (roman numerals, letters, etc.)

§startnum: bool

Start ordered lists at arbitrary numbers

§example_lists: bool

Example lists with (@) markers

§task_lists: bool

GitHub-style task lists - [ ] and - [x]

§definition_lists: bool

Term/definition syntax

§backtick_code_blocks: bool

Fenced code blocks with backticks

§fenced_code_blocks: bool

Fenced code blocks with tildes

§fenced_code_attributes: bool

Attributes on fenced code blocks {.language #id}

§executable_code: bool

Executable code syntax (currently fenced chunks like {r} / {python})

§rmarkdown_inline_code: bool

R Markdown inline executable code (...r …)

§quarto_inline_code: bool

Quarto inline executable code (...{r} …)

§inline_code_attributes: bool

Attributes on inline code

§simple_tables: bool

Simple table syntax

§multiline_tables: bool

Multiline cell content in tables

§grid_tables: bool

Grid-style tables

§pipe_tables: bool

Pipe tables (GitHub/PHP Markdown style)

§table_captions: bool

Table captions

§fenced_divs: bool

Fenced divs ::: {.class}

§native_divs: bool

HTML

elements

§line_blocks: bool

Line blocks for poetry | prefix

§intraword_underscores: bool

Underscores don’t trigger emphasis in snake_case

§strikeout: bool

Strikethrough text

§superscript: bool

Superscript and subscript ^super^ sub

§subscript: bool§inline_links: bool

Inline links text

§reference_links: bool

Reference links [text][ref]

§shortcut_reference_links: bool

Shortcut reference links [ref] without second []

§link_attributes: bool

Attributes on links text{.class}

§autolinks: bool

Automatic links http://example.com

§inline_images: bool

Inline images alt

§implicit_figures: bool

Paragraph with just image becomes figure

§tex_math_dollars: bool

Dollar-delimited math $x$ and $$equation$$

§tex_math_gfm: bool

[NON-DEFAULT] GFM math: inline $...$ and fenced ``` math blocks

§tex_math_single_backslash: bool

[NON-DEFAULT] Single backslash math (…) and […] (RMarkdown default)

§tex_math_double_backslash: bool

[NON-DEFAULT] Double backslash math \(…\) and \[…\]

§inline_footnotes: bool

Inline footnotes ^[text]

§footnotes: bool

Reference footnotes [^1] (requires footnote parsing)

§citations: bool

Citation syntax [@cite]

§bracketed_spans: bool

Bracketed spans [text]{.class}

§native_spans: bool

HTML elements

§yaml_metadata_block: bool

YAML metadata block

§pandoc_title_block: bool

Pandoc title block (Title/Author/Date)

§mmd_title_block: bool

[NON-DEFAULT] MultiMarkdown metadata/title block (Key: Value …)

§raw_html: bool

Raw HTML blocks and inline

§markdown_in_html_blocks: bool

Markdown inside HTML blocks

§raw_tex: bool

LaTeX commands and environments

§raw_attribute: bool

Generic raw blocks with {=format} syntax

§all_symbols_escapable: bool

Backslash escapes any symbol

§escaped_line_breaks: bool

Backslash at line end = hard line break

§autolink_bare_uris: bool

[NON-DEFAULT] Bare URLs become links

§hard_line_breaks: bool

[NON-DEFAULT] Newline =

§mmd_header_identifiers: bool

[NON-DEFAULT] MultiMarkdown style heading identifiers [my-id]

§mmd_link_attributes: bool

[NON-DEFAULT] MultiMarkdown key=value attributes on reference defs

§alerts: bool

[NON-DEFAULT] GitHub/CommonMark alerts in blockquotes (> [!NOTE])

§emoji: bool

[NON-DEFAULT] :emoji: syntax

§mark: bool

[NON-DEFAULT] Highlighted ==text==

§quarto_callouts: bool

Quarto callout blocks (.callout-note, etc.)

§quarto_crossrefs: bool

Quarto cross-references @fig-id, @tbl-id

§quarto_shortcodes: bool

Quarto shortcodes {{< name args >}}

§bookdown_references: bool

Bookdown references @ref(label) and (#label)

§bookdown_equation_references: bool

Bookdown equation references in LaTeX math blocks (#eq:label)

Implementations§

Source§

impl Extensions

Source

pub fn for_flavor(flavor: Flavor) -> Self

Get the default extension set for a given flavor.

Source

pub fn merge_with_flavor( user_overrides: HashMap<String, bool>, flavor: Flavor, ) -> Self

Merge user-specified extension overrides with flavor defaults.

This is used to support partial extension overrides in config files. For example, if a user specifies flavor = "quarto" and then sets [extensions] quarto-crossrefs = false, we want all other extensions to use Quarto defaults, not Pandoc defaults.

§Arguments
  • user_overrides - Map of extension names to their user-specified values
  • flavor - The flavor to use for default values
§Returns

A new Extensions struct with flavor defaults merged with user overrides

Trait Implementations§

Source§

impl Clone for Extensions

Source§

fn clone(&self) -> Extensions

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Extensions

Source§

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

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

impl Default for Extensions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Extensions

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Extensions

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> 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.