strong.js 388 B

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