interface cleanup

This commit is contained in:
evilchili committed 2026-10-16 13:27:47 -07:00
1 parent 965fc09d99
commit 9a2ba8c330
8 files changed
+18 -76

No files matched your search

+3 -13
View File
@@ -7,27 +7,17 @@ export interface Token {
groups?: {
[key: string]: string;
};
/** For link tokens: the href and optional title. */
href?: string;
title?: string;
meta?: Record<string, string>;
}
/**
* A Tag is the core abstraction: it knows how to match markdown syntax,
* convert it to HTML, and convert the HTML back to markdown. Tags are
* registered by HTML selector (e.g. 'STRONG,B') so the converter can
* look them up during HTML→markdown conversion.
*/
export interface TagType {
element: string[];
opener: string[];
closer: string | null;
precedence: number;
isBlock: boolean;
template?: string;
pattern?: RegExp | null;
showDelimitersInEditorNodes?: boolean;
aliases?: string[];
showDelimitersInEditorNodes: boolean;
template: string;
pattern: RegExp | null;
tokenize(role: TokenRole, sequence: string, value: string): Token | null;
toHTML: (token: Token, callback: Function) => string;
toMarkdown: (element: HTMLElement, callback: Function) => string;