Skip to main content

parse_text_for_quotes

Function parse_text_for_quotes 

Source
pub fn parse_text_for_quotes(content: &str) -> Vec<InlineNode>
Expand description

Parse text for inline formatting markup (bold, italic, monospace, etc.).

This function scans the input text for AsciiDoc formatting patterns and returns a vector of InlineNodes representing the parsed content. Used for applying “quotes” substitution to verbatim block content.

§Supported Patterns

  • *bold* and **bold** (constrained/unconstrained)
  • _italic_ and __italic__
  • `monospace` and ``monospace``
  • ^superscript^ and ~subscript~
  • #highlight# and ##highlight##
  • "`curved quotes`" and '`curved apostrophe`'

§Example

use acdc_parser::parse_text_for_quotes;

let nodes = parse_text_for_quotes("This has *bold* text.");
assert_eq!(nodes.len(), 3); // "This has ", Bold("bold"), " text."