docutils-ts
Version:
Port of the Python Docutils library to TypeScript
51 lines (50 loc) • 2.21 kB
TypeScript
import StateWS from "../../../states/stateWS.js";
import { Document, ElementInterface, NodeInterface, StateInterface, StateMachineFactoryFunction, Systemmessage, TransitionsArray } from "../../../types.js";
import StringList from "../../../stringList.js";
import RSTStateMachine from "../rstStateMachine.js";
import { Explicit, InlinerInterface, NestedParseArgs, Nestedstatemachine, RstMemo } from "../types.js";
declare abstract class RSTState extends StateWS {
get explicit(): Explicit | undefined;
set explicit(value: Explicit | undefined);
static stateName: string;
private _explicit?;
memo?: RstMemo;
inliner?: InlinerInterface;
protected parent?: ElementInterface;
protected rstStateMachine: RSTStateMachine;
document?: Document;
protected stateClasses?: string[];
messages: NodeInterface[];
blankFinish?: boolean;
/** Padding character for East Asian double-width text. */
doubleWidthPadChar: string;
constructor(stateMachine: RSTStateMachine, debug?: boolean);
runtimeInit(): void;
gotoLine(absLineOffset: number): void;
noMatch(context: any[], transitions: TransitionsArray | undefined): [{}[], (string | StateInterface | undefined), {}[]];
bof(): string[][];
nestedParse(inputLines: StringList, inputOffset: number, node: NodeInterface, matchTitles?: boolean, factoryFunction?: StateMachineFactoryFunction<Nestedstatemachine>): number | undefined;
nestedListParse(block: StringList, args: NestedParseArgs): [number, boolean];
section(args: {
title: string;
source: string;
style: any | any[];
lineno: number;
messages: Systemmessage[];
}): void;
checkSubsection(args: {
source: string;
style: any | any[];
lineno: number;
}): boolean;
title_inconsistent(sourcetext: string, lineno: number): NodeInterface;
newSubsection(args: {
title: string;
lineno: number;
messages: Systemmessage[];
}): void;
unindentWarning(nodeName: string): NodeInterface;
paragraph(lines: (string | {})[], lineno: number): any[];
inline_text(text: string, lineno: number): any[][];
}
export default RSTState;