index.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /**
  2. * Parse labels.
  3. *
  4. * > 👉 **Note**: labels in markdown are capped at 999 characters in the string.
  5. *
  6. * ###### Examples
  7. *
  8. * ```markdown
  9. * [a]
  10. * [a
  11. * b]
  12. * [a\]b]
  13. * ```
  14. *
  15. * @this {TokenizeContext}
  16. * Tokenize context.
  17. * @param {Effects} effects
  18. * Context.
  19. * @param {State} ok
  20. * State switched to when successful.
  21. * @param {State} nok
  22. * State switched to when unsuccessful.
  23. * @param {TokenType} type
  24. * Type of the whole label (`[a]`).
  25. * @param {TokenType} markerType
  26. * Type for the markers (`[` and `]`).
  27. * @param {TokenType} stringType
  28. * Type for the identifier (`a`).
  29. * @returns {State}
  30. * Start state.
  31. */
  32. export function factoryLabel(
  33. this: import('micromark-util-types').TokenizeContext,
  34. effects: Effects,
  35. ok: State,
  36. nok: State,
  37. type: TokenType,
  38. markerType: TokenType,
  39. stringType: TokenType
  40. ): State
  41. export type Effects = import('micromark-util-types').Effects
  42. export type State = import('micromark-util-types').State
  43. export type TokenizeContext = import('micromark-util-types').TokenizeContext
  44. export type TokenType = import('micromark-util-types').TokenType