antsibull-docs
Version:
TypeScript library for processing Ansible documentation markup
18 lines • 1.04 kB
TypeScript
import { ParsingOptions, Whitespace } from './opts';
import { AnyPart, Paragraph } from './dom';
export declare function processWhitespace(text: string, whitespace: Whitespace, codeEnvironment: boolean, noNewlines: boolean): string;
export interface CommandParser {
command: string;
parameters: number;
escapedArguments?: boolean;
stripSurroundingWhitespace?: boolean;
process: (args: string[], opts: ParsingOptions, source: string | undefined, whitespace: Whitespace) => AnyPart;
}
export declare function composeCommandMap(commands: CommandParser[]): Map<string, CommandParser>;
export declare function composeCommandRE(commands: CommandParser[]): RegExp;
export declare function parseString(input: string, commandRE: RegExp, commands: Map<string, CommandParser>, opts: ParsingOptions, where: string): Paragraph;
/**
Parses a string or a list of strings to a list of paragraphs.
*/
export declare function parse(input: string | string[], opts?: ParsingOptions): Paragraph[];
//# sourceMappingURL=parser.d.ts.map