export { REGEXP_EMPTY_BLOCKQUOTE, REGEXP_EMPTY_OL, REGEXP_EMPTY_UL } from './cleanup.js'; /** * Matches ATX Markdown headers (1–6 `#` at start of string or after a newline). * * Flags: `gm`. Reset `.lastIndex` between `.test()` / `.exec()` calls. * * Captures: [1] start or newline, [2] the `#` run, [3] heading text. * * Fails on setext headers (`Title` / `=====`). * * @example * '# Header 1'.match(REGEXP_HEADER) * // ['# Header 1', '', '#', 'Header 1'] * @example Does not match setext `Title\n=====` */ declare const REGEXP_HEADER: RegExp; /** * Matches level-2 ATX headers only (`## …`). * * Flags: `gim`. Captures: [1] heading text. * * @example * '## Heading 2'.match(REGEXP_H2) * // ['## Heading 2', 'Heading 2'] * @example Does not match `# Heading 1` */ declare const REGEXP_H2: RegExp; /** * Matches level-3 ATX headers only (`### …`). * * Flags: `gim`. Captures: [1] heading text. * * @example * '### Heading 3'.match(REGEXP_H3) * // ['### Heading 3', 'Heading 3'] * @example Does not match `## Heading 2` */ declare const REGEXP_H3: RegExp; /** * Matches Markdown image syntax ``. Empty alt is valid. * * Flags: `g`. Reset `.lastIndex` between `.test()` / `.exec()` calls. * * Captures: [1] alt text, [2] url. * * Fails on reference images and on links without `!`. * * @example * ''.match(REGEXP_IMAGE) * // ['', 'logo', './logo.png'] * @example Does not match `[logo](./logo.png)` */ declare const REGEXP_IMAGE: RegExp; /** * Matches inline Markdown link syntax `[text](url)`. * * Flags: `g`. Reset `.lastIndex` between `.test()` / `.exec()` calls, * or use `matchAll`. * * Captures: [1] text, [2] url. * * Fails on reference links (`[text][id]`), links inside code unless you * use `extractLinks()`, and image syntax (use `REGEXP_IMAGE`). * * @example * '[a](b)'.match(REGEXP_LINK) * // ['[a](b)', 'a', 'b'] * @example Does not match `[GitHub][id]` */ declare const REGEXP_LINK: RegExp; /** * Matches bold/strong using `**` or `__`. * * Flags: `g`. Reset `.lastIndex` between `.test()` / `.exec()` calls. * * Captures: [1] text inside `**`, [2] text inside `__` (the other is undefined). * * Fails on nested `***bold italic***` and on single-star italic. * * @example * '**bold**'.match(REGEXP_STRONG) * // ['**bold**', 'bold', undefined] * @example Does not match `*italic*` */ declare const REGEXP_STRONG: RegExp; /** * Matches italic/emphasis using `*` or `_` with surrounding whitespace * (or start/end / `>` / `<`). * * Flags: `g`. Reset `.lastIndex` between `.test()` / `.exec()` calls. * * Captures: [1] leading context, [2] delimiter, [3] inner text, [4] trailing context. * * Fails on mid-word `foo_bar_baz`, nested `***bold italic***`, and * `not*italic*` with no surrounding whitespace. * * @example * ' *italic* '.match(REGEXP_ITALIC) * // [' *italic* ', ' ', '*', 'italic', ' '] * @example Does not match `not*italic*` */ declare const REGEXP_ITALIC: RegExp; /** * Matches strikethrough using `~~` delimiters. * * @example Matches `~~deleted~~` * @example Does not match `~deleted~` */ declare const REGEXP_DEL: RegExp; /** * Matches inline code using single backticks. Legacy alias of REGEXP_INLINE_CODE style matching. * * @example Matches `` `code` `` * @example Does not match a fenced ``` block */ declare const REGEXP_CODE: RegExp; /** * Matches the custom newsletter quote syntax `:"…"`. * * @example Matches `:"quoted text":` * @example Does not match `"quoted text"` */ declare const REGEXP_Q: RegExp; /** * Matches a blockquote line starting with `>` or `>` after a newline. * * @example Matches `\n> quoted paragraph` * @example Does not match `> quote` at the very start of the string */ declare const REGEXP_BLOCKQUOTE: RegExp; /** * Matches a horizontal rule: 5 or more dashes after a newline. * * @example Matches `\n-----` * @example Does not match `---` */ declare const REGEXP_HR: RegExp; /** * Heuristic: paragraph-like content sitting between two newlines. * * @example Matches `\nhello world\n` * @example Does not match a single-line string with no surrounding newlines */ declare const REGEXP_PARAGRAPH: RegExp; /** * Matches two or more consecutive newlines (`\n`, `\r\n`, or `\r`). * * @example Matches `a\n\nb` * @example Does not match a single `\n` */ declare const REGEXP_BR: RegExp; /** * Matches fenced code blocks using ``` or ~~~ fences. * Captures: [1] fence chars, [2] language, [3] body. * * @example Matches a fenced ```js block * @example Does not match indented-only code with no fence */ declare const REGEXP_FENCED_CODE: RegExp; /** * Matches inline code spans with balanced backticks. Prefer this over REGEXP_CODE. * * @example Matches `` `code` `` * @example Does not match escaped backticks */ declare const REGEXP_INLINE_CODE: RegExp; /** * Matches raw HTML tags including closing and self-closing forms. * * @example Matches `