index.d.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * Parse spaces and tabs.
  3. *
  4. * There is no `nok` parameter:
  5. *
  6. * * spaces in markdown are often optional, in which case this factory can be
  7. * used and `ok` will be switched to whether spaces were found or not
  8. * * one line ending or space can be detected with `markdownSpace(code)` right
  9. * before using `factorySpace`
  10. *
  11. * ###### Examples
  12. *
  13. * Where `␉` represents a tab (plus how much it expands) and `␠` represents a
  14. * single space.
  15. *
  16. * ```markdown
  17. * ␉
  18. * ␠␠␠␠
  19. * ␉␠
  20. * ```
  21. *
  22. * @param {Effects} effects
  23. * Context.
  24. * @param {State} ok
  25. * State switched to when successful.
  26. * @param {TokenType} type
  27. * Type (`' \t'`).
  28. * @param {number | undefined} [max=Infinity]
  29. * Max (exclusive).
  30. * @returns {State}
  31. * Start state.
  32. */
  33. export function factorySpace(effects: Effects, ok: State, type: TokenType, max?: number | undefined): State;
  34. import type { Effects } from 'micromark-util-types';
  35. import type { State } from 'micromark-util-types';
  36. import type { TokenType } from 'micromark-util-types';
  37. //# sourceMappingURL=index.d.ts.map