index.d.ts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /**
  2. * Check whether a character code is an ASCII control character.
  3. *
  4. * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)
  5. * to U+001F (US), or U+007F (DEL).
  6. *
  7. * @param {Code} code
  8. * Code.
  9. * @returns {boolean}
  10. * Whether it matches.
  11. */
  12. export function asciiControl(code: Code): boolean;
  13. /**
  14. * Check whether a character code is a markdown line ending.
  15. *
  16. * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN
  17. * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).
  18. *
  19. * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE
  20. * RETURN (CR) are replaced by these virtual characters depending on whether
  21. * they occurred together.
  22. *
  23. * @param {Code} code
  24. * Code.
  25. * @returns {boolean}
  26. * Whether it matches.
  27. */
  28. export function markdownLineEnding(code: Code): boolean;
  29. /**
  30. * Check whether a character code is a markdown line ending (see
  31. * `markdownLineEnding`) or markdown space (see `markdownSpace`).
  32. *
  33. * @param {Code} code
  34. * Code.
  35. * @returns {boolean}
  36. * Whether it matches.
  37. */
  38. export function markdownLineEndingOrSpace(code: Code): boolean;
  39. /**
  40. * Check whether a character code is a markdown space.
  41. *
  42. * A **markdown space** is the concrete character U+0020 SPACE (SP) and the
  43. * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).
  44. *
  45. * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is
  46. * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL
  47. * SPACE (VS) characters, depending on the column at which the tab occurred.
  48. *
  49. * @param {Code} code
  50. * Code.
  51. * @returns {boolean}
  52. * Whether it matches.
  53. */
  54. export function markdownSpace(code: Code): boolean;
  55. export function asciiAlpha(code: Code): boolean;
  56. export function asciiAlphanumeric(code: Code): boolean;
  57. export function asciiAtext(code: Code): boolean;
  58. export function asciiDigit(code: Code): boolean;
  59. export function asciiHexDigit(code: Code): boolean;
  60. export function asciiPunctuation(code: Code): boolean;
  61. export function unicodePunctuation(code: Code): boolean;
  62. export function unicodeWhitespace(code: Code): boolean;
  63. export type Code = import('micromark-util-types').Code;
  64. //# sourceMappingURL=index.d.ts.map