@umbraco-cms/backoffice
    Preparing search index...

    Interface BlockParserConfig

    interface BlockParserConfig {
        baseIndentSize?: number;
        createToken: (data: any, nestedTokens?: any[]) => ParsedBlock;
        customNestedParser?: (dedentedContent: string) => any[] | undefined;
        extractItemData: (
            match: RegExpMatchArray,
        ) => { indentLevel: number; mainContent: string; [key: string]: any };
        itemPattern: RegExp;
    }
    Index

    Properties

    baseIndentSize?: number

    Base indentation to remove from nested content (default: 2 spaces)

    createToken: (data: any, nestedTokens?: any[]) => ParsedBlock

    Function to create the final token

    customNestedParser?: (dedentedContent: string) => any[] | undefined

    Custom parser for nested content. If provided, this will be called instead of the default lexer.blockTokens() for parsing nested content. This allows recursive parsing of the same block type.

    extractItemData: (
        match: RegExpMatchArray,
    ) => { indentLevel: number; mainContent: string; [key: string]: any }

    Function to extract data from regex match

    itemPattern: RegExp

    Regex pattern to match block items