UNPKG

@npmstuff/argdown-core

Version:

A pluggable parser for the Argdown argumentation syntax

42 lines (41 loc) 1.31 kB
import { IArgdownPlugin, IRequestHandler } from "../IArgdownPlugin"; import { IRuleNodeHandler, ITokenNodeHandler } from "../ArgdownTreeWalker"; import { IArgdownRequest, IArgdownResponse } from "../index"; export interface IHtmlExportSettings { headless?: boolean; createHeaderFromMetadata?: boolean; cssFile?: string; lang?: string; charset?: string; allowFileProtocol?: boolean; head?: string; validateLink?: (url: string, allowFile: boolean) => boolean; normalizeLink?: (url: string) => string; outputDir?: string; css?: string; } declare module "../index" { interface IArgdownRequest { html?: IHtmlExportSettings; } interface IArgdownResponse { html?: string; htmlIds?: { [id: string]: boolean; } | null; } } export declare class HtmlExportPlugin implements IArgdownPlugin { name: string; defaults: IHtmlExportSettings; ruleListeners: { [eventId: string]: IRuleNodeHandler; }; tokenListeners: { [eventId: string]: ITokenNodeHandler; }; getSettings(request: IArgdownRequest): IHtmlExportSettings; prepare: IRequestHandler; constructor(config?: IHtmlExportSettings); getCssClassesFromTags(response: IArgdownResponse, tags: string[]): string; }