footnote-reference.js 341 B

123456789101112131415
  1. 'use strict'
  2. module.exports = footnoteReference
  3. var u = require('unist-builder')
  4. function footnoteReference(h, node) {
  5. var identifier = node.identifier
  6. return h(node.position, 'sup', {id: 'fnref-' + identifier}, [
  7. h(node, 'a', {href: '#fn-' + identifier, className: ['footnote-ref']}, [
  8. u('text', identifier)
  9. ])
  10. ])
  11. }