export interface InlineRun {
text: string;
bold?: boolean;
italic?: boolean;
smallCaps?: boolean;
script?: 'sup' | 'sub';
/** Postext Markdown written as is. */
raw?: boolean;
/** Link destination. */
href?: string;
/** Chip style id. */
chip?: string;
/** Footnote marker (`[^id]`); `text` is empty. */
note?: string;
}
export declare const WORD_JOINER = "\u2060";
/** A forced line break inside a paragraph (#620) in a run's text: Word's
* soft return (``, Shift+Enter), Postext Markdown's backslash at
* the end of a line (or `\\` before a space). */
export declare const LINE_BREAK = "\u2028";
/** Escape the characters with inline meaning so they print literally. An
* `_` between two letters is text already and stays bare. */
export declare function escapeText(text: string, before?: string, after?: string): string;
/** A word joiner in front of a paragraph that would otherwise open a list,
* heading, quote, fence or note definition. */
export declare function guardLineStart(line: string): string;
/** A link destination Postext reads back whole: spaces, `$`, backslashes,
* angle brackets and unbalanced parentheses percent-encoded. */
export declare function linkDestination(url: string): string;
/** Style boundaries on word boundaries: spaces and punctuation between two
* runs of one style take that style; a style change inside a word moves to
* the word's edge (the longer side wins). */
export declare function normaliseRuns(input: InlineRun[], tidy?: boolean): InlineRun[];
/** Postext inline Markdown for runs. Links and chips wrap their own runs. */
export declare function renderInline(input: InlineRun[], opts?: {
collapseSpaces?: boolean;
tidy?: boolean;
}): string;
export interface ParseInlineOptions {
/** Footnote ids to turn into Word notes (the rest stay verbatim). */
notes?: ReadonlySet;
/** Called for each note marker taken; return false to keep it verbatim
* (a note cited twice is one Word note). */
takeNote?: (id: string) => boolean;
/** Heading text: `\\` (a title break) stays verbatim. Elsewhere a forced
* line break (#620) becomes a {@link LINE_BREAK} in the text. */
heading?: boolean;
}
/** Postext inline Markdown → runs. Every character with inline meaning the
* runs cannot say (an unpaired `*`, a `$` that opens nothing) is kept as a
* verbatim run, so `renderInline(parseInline(x))` reads as `x`. */
export declare function parseInline(text: string, opts?: ParseInlineOptions): InlineRun[];
//# sourceMappingURL=inline.d.ts.map