mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-04-19 14:20:25 +01:00
20 lines
459 B
JavaScript
20 lines
459 B
JavaScript
/**
|
|
Inline Markdown-to-Chalk conversion routines.
|
|
@license MIT. See LICENSE.md for details.
|
|
@module md2chalk.js
|
|
*/
|
|
|
|
(function(){
|
|
|
|
var MD = require('marked');
|
|
var CHALK = require('chalk');
|
|
var LO = require('lodash');
|
|
|
|
module.exports = function( v, style, boldStyle ) {
|
|
boldStyle = boldStyle || 'bold';
|
|
var temp = v.replace(/\*\*(.*?)\*\*/g, LO.get( CHALK, boldStyle )('$1'));
|
|
return style ? LO.get( CHALK, style )(temp) : temp;
|
|
};
|
|
|
|
}());
|