UNPKG

@awesome-fe/translate

Version:
17 lines 619 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.emphasisVisitor = void 0; function emphasisVisitor(node) { let marker = node.marker ?? this.options.emphasis; const content = this.all(node).join(''); // When in pedantic mode, prevent using underscore as the marker when there // are underscores in the content. if (this.options.pedantic && marker === '_' && content.indexOf(marker) !== -1) { marker = '*'; } return marker + content + marker; } exports.emphasisVisitor = emphasisVisitor; //# sourceMappingURL=emphasis-visitor.js.map