Skip to main content

emit_inlines

Function emit_inlines 

Source
pub fn emit_inlines(
    builder: &mut GreenNodeBuilder<'_>,
    text: &str,
    config: &ParserOptions,
    suppress_footnote_refs: bool,
)
Expand description

Emit inline elements from text content directly into the builder.

This helper calls the recursive inline parser, allowing block-level parsers to emit inline structure during parsing.

§Arguments

  • builder - The GreenNodeBuilder to emit nodes into
  • text - The text content to parse for inline elements
  • config - Configuration controlling which extensions are enabled
  • suppress_footnote_refs - When true, [^id] bytes are emitted as literal TEXT instead of FOOTNOTE_REFERENCE. Block parsers set this when the inline content lives inside a reference-style footnote definition body, mirroring pandoc’s silent drop of nested refs.

§Example

// In a block parser (e.g., headings):
builder.start_node(SyntaxKind::HEADING_CONTENT.into());
emit_inlines(builder, heading_text, config, false);
builder.finish_node();