docutils-ts
Version:
Port of the Python Docutils library to TypeScript
24 lines (23 loc) • 783 B
TypeScript
export declare const openers: string;
export declare const closers: string;
export declare const quotePairs: {
'\u00BB': string;
'\u2018': string;
'\u2019': string;
'\u201A': string;
'\u201C': string;
'\u201E': string;
'\u201D': string;
'\u203A': string;
};
/**
* Test whether `c1` and `c2` are a matching open/close character pair.
*
* Matching open/close pairs are at the same position in
* `punctuation_chars.openers` and `punctuation_chars.closers`.
* The pairing of open/close quotes is ambiguous due to different
* typographic conventions in different languages,
* so we test for additional matches stored in `quote_pairs`.
*/
declare function matchChars(c1: string, c2: string): boolean;
export { matchChars };