UNPKG

@tricoteuses/arbre-de-la-loi

Version:

Generate ASTs from the French bills & laws; manipulate & export them to Markdown, etc.

26 lines (25 loc) 646 B
export interface Node { alineas?: string[]; children?: Node[]; headers: string[]; type: NodeType; } export declare enum NodeType { TEXTE = 0, TOME = 1, PARTIE = 2, LIVRE = 3, TITRE = 4, SOUS_TITRE = 5, CHAPITRE = 6, SECTION = 7, SOUS_SECTION = 8, ARTICLE = 9, ANNEXE = 10, ETAT = 11, EXPOSE_DES_MOTIFS = 12, AUTRE = 13 } export declare function parseTexteMarkdown(markdown: string, texteHeaders: string[]): Node[]; export declare function restructureTexteMarkdown(markdown: string, texteHeaders: string[]): string; export declare function stringifyTree(node: Node): string;