index.d.ts 702 B

12345678910111213141516171819202122
  1. /**
  2. * Classify whether a code represents whitespace, punctuation, or something
  3. * else.
  4. *
  5. * Used for attention (emphasis, strong), whose sequences can open or close
  6. * based on the class of surrounding characters.
  7. *
  8. * > 👉 **Note**: eof (`null`) is seen as whitespace.
  9. *
  10. * @param {Code} code
  11. * Code.
  12. * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}
  13. * Group.
  14. */
  15. export function classifyCharacter(
  16. code: Code
  17. ):
  18. | typeof constants.characterGroupWhitespace
  19. | typeof constants.characterGroupPunctuation
  20. | undefined
  21. export type Code = import('micromark-util-types').Code
  22. import {constants} from 'micromark-util-symbol'