wdpr
    Preparing search index...
    • Parses attributes from block opening tags WITHOUT safety filtering.

      Use this for block-specific parameters (like type on [[code]]) that are not emitted as HTML attributes and therefore do not need XSS protection. The parsing logic is identical to parseAttributes except the result is returned as-is.

      Hyphenated name handling is configurable because some contexts (e.g. code block with data-src) should treat hyphens as part of the name, while others should not.

      Also handles STRIKE_MARKER tokens (--) in attribute name positions, which can appear when a double hyphen is used in names like data--something.

      Parameters

      • ctx: ParseContext

        Parse context.

      • startPos: number

        Token index to begin scanning.

      • hyphenatedNames: boolean = true

        When true (default), hyphens are collected into the attribute name. When false, only the first segment before a hyphen is used.

      Returns { attrs: Record<string, string>; consumed: number }

      Parsed (unfiltered) attributes and total tokens consumed.