emphasis.js 351 B

12345678910111213141516
  1. 'use strict';
  2. module.exports = emphasis;
  3. /* Stringify an `emphasis`.
  4. *
  5. * The marker used is configurable through `emphasis`, which
  6. * defaults to an underscore (`'_'`) but also accepts an
  7. * asterisk (`'*'`):
  8. *
  9. * *foo*
  10. */
  11. function emphasis(node) {
  12. var marker = this.options.emphasis;
  13. return marker + this.all(node).join('') + marker;
  14. }