myst-cli
Version:
Command line tools for MyST
34 lines • 887 B
TypeScript
/**
* Compute the indentation of a YAML line
*
* @param line
*/
export declare function yamlLineIndent(line: string): number | undefined;
/**
* Find the start of a YAML section body with a given key.
*
* @param name - section name
* @param indent - indent of parent section
* @param lines - lines to parse
* @param index - index of starting line
*
* e.g. for the following YAML:
* saturn:
* best-moons:
* - titan
* - dione
* jupiter:
* best-moons:
* - io
* - europa
* This function can be used to find the lines bounding the `jupiter`- section, i.e.
* best-moons:
* - io
* - europa
*/
export declare function findYAMLSection(name: string, indent: number, lines: string[], index?: number): {
start: number;
stop: number;
indent: number | undefined;
} | undefined;
//# sourceMappingURL=utils.d.ts.map