pangu
Version:
Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean) and half-width characters (alphabetical letters, numerical digits and symbols).
14 lines (13 loc) • 652 B
TypeScript
export declare class DomWalker {
static readonly blockTags: RegExp;
static readonly ignoredTags: RegExp;
static readonly spaceLikeTags: RegExp;
static readonly spaceSensitiveTags: RegExp;
static readonly ignoredClass = "no-pangu-spacing";
static collectTextNodes(contextNode: Node, reverse?: boolean): Text[];
static findBoundaryNode(textNode: Node, edge: 'first' | 'last'): Node;
static isFirstTextChild(parentNode: Node, targetNode: Node): boolean;
static isLastTextChild(parentNode: Node, targetNode: Node): boolean;
static isIgnoredElement(element: Element): boolean;
private static isContentEditable;
}