text.js 405 B

1234567891011121314151617
  1. /**
  2. * @typedef {import('mdast').Parents} Parents
  3. * @typedef {import('mdast').Text} Text
  4. * @typedef {import('../types.js').Info} Info
  5. * @typedef {import('../types.js').State} State
  6. */
  7. /**
  8. * @param {Text} node
  9. * @param {Parents | undefined} _
  10. * @param {State} state
  11. * @param {Info} info
  12. * @returns {string}
  13. */
  14. export function text(node, _, state, info) {
  15. return state.safe(node.value, info)
  16. }