cerebrate/webroot/js/node_modules/mermaid/dist/diagram-api/frontmatter.d.ts

19 lines
570 B
TypeScript
Raw Normal View History

2023-10-05 11:00:51 +02:00
import type { MermaidConfig } from '../config.type.js';
interface FrontMatterMetadata {
title?: string;
displayMode?: string;
config?: MermaidConfig;
}
export interface FrontMatterResult {
text: string;
metadata: FrontMatterMetadata;
}
/**
* Extract and parse frontmatter from text, if present, and sets appropriate
* properties in the provided db.
* @param text - The text that may have a YAML frontmatter.
* @returns text with frontmatter stripped out
*/
export declare function extractFrontMatter(text: string): FrontMatterResult;
export {};