astro-ghostcms/.pnpm-store/v3/files/f7/f6b37f8947733051bcdcd881242...

83 lines
2.8 KiB
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
/**
* Check whether a character code is an ASCII control character.
*
* An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)
* to U+001F (US), or U+007F (DEL).
*
* @param {Code} code
* Code.
* @returns {boolean}
* Whether it matches.
*/
export function asciiControl(code: Code): boolean
/**
* Check whether a character code is a markdown line ending.
*
* A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN
* LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).
*
* In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE
* RETURN (CR) are replaced by these virtual characters depending on whether
* they occurred together.
*
* @param {Code} code
* Code.
* @returns {boolean}
* Whether it matches.
*/
export function markdownLineEnding(code: Code): boolean
/**
* Check whether a character code is a markdown line ending (see
* `markdownLineEnding`) or markdown space (see `markdownSpace`).
*
* @param {Code} code
* Code.
* @returns {boolean}
* Whether it matches.
*/
export function markdownLineEndingOrSpace(code: Code): boolean
/**
* Check whether a character code is a markdown space.
*
* A **markdown space** is the concrete character U+0020 SPACE (SP) and the
* virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).
*
* In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is
* replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL
* SPACE (VS) characters, depending on the column at which the tab occurred.
*
* @param {Code} code
* Code.
* @returns {boolean}
* Whether it matches.
*/
export function markdownSpace(code: Code): boolean
/**
* Check whether the character code represents Unicode punctuation.
*
* A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation,
* Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf`
* (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po`
* (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII
* punctuation (see `asciiPunctuation`).
*
* See:
* **\[UNICODE]**:
* [The Unicode Standard](https://www.unicode.org/versions/).
* Unicode Consortium.
*
* @param {Code} code
* Code.
* @returns {boolean}
* Whether it matches.
*/
export function unicodePunctuation(code: Code): boolean
export function asciiAlpha(code: Code): boolean
export function asciiAlphanumeric(code: Code): boolean
export function asciiAtext(code: Code): boolean
export function asciiDigit(code: Code): boolean
export function asciiHexDigit(code: Code): boolean
export function asciiPunctuation(code: Code): boolean
export function unicodeWhitespace(code: Code): boolean
export type Code = import('micromark-util-types').Code