1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-05 09:56:22 +00:00
HackMyResume/dist/utils/md2chalk.js

29 lines
576 B
JavaScript
Raw Normal View History

2016-01-27 10:29:26 +00:00
(function() {
2018-02-12 05:05:29 +00:00
/**
Inline Markdown-to-Chalk conversion routines.
@license MIT. See LICENSE.md for details.
@module utils/md2chalk
*/
2016-01-27 10:29:26 +00:00
var CHALK, LO, MD;
MD = require('marked');
CHALK = require('chalk');
LO = require('lodash');
module.exports = function(v, style, boldStyle) {
var temp;
boldStyle = boldStyle || 'bold';
temp = v.replace(/\*\*(.*?)\*\*/g, LO.get(CHALK, boldStyle)('$1'));
if (style) {
return LO.get(CHALK, style)(temp);
} else {
return temp;
}
};
}).call(this);
2016-02-02 02:14:36 +00:00
//# sourceMappingURL=md2chalk.js.map