Files
30-seconds-of-code/node_modules/remark-stringify/lib/visitors/emphasis.js
2019-08-20 15:52:05 +02:00

17 lines
351 B
JavaScript

'use strict';
module.exports = emphasis;
/* Stringify an `emphasis`.
*
* The marker used is configurable through `emphasis`, which
* defaults to an underscore (`'_'`) but also accepts an
* asterisk (`'*'`):
*
* *foo*
*/
function emphasis(node) {
var marker = this.options.emphasis;
return marker + this.all(node).join('') + marker;
}