index.d.ts 714 B

123456789101112131415161718192021
  1. /**
  2. * Parse spaces and tabs.
  3. *
  4. * There is no `nok` parameter:
  5. *
  6. * * line endings or spaces in markdown are often optional, in which case this
  7. * factory can be used and `ok` will be switched to whether spaces were found
  8. * or not
  9. * * one line ending or space can be detected with
  10. * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace`
  11. *
  12. * @param {Effects} effects
  13. * Context.
  14. * @param {State} ok
  15. * State switched to when successful.
  16. * @returns {State}
  17. * Start state.
  18. */
  19. export function factoryWhitespace(effects: Effects, ok: State): State
  20. export type Effects = import('micromark-util-types').Effects
  21. export type State = import('micromark-util-types').State