mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-22 08:20:11 +00:00
Tweak output colorization.
This commit is contained in:
parent
f6f383751f
commit
6801e39f97
@ -83,7 +83,10 @@ Output routines for HackMyResume.
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case HME.afterParse:
|
case HME.afterParse:
|
||||||
L( M2C( this.msgs.afterRead.msg, 'green' ), evt.fmt.toUpperCase(), evt.file );
|
L(
|
||||||
|
M2C( this.msgs.afterRead.msg, 'gray', 'white.dim'), evt.fmt.toUpperCase(), evt.file
|
||||||
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HME.afterTheme:
|
case HME.afterTheme:
|
||||||
@ -107,7 +110,7 @@ Output routines for HackMyResume.
|
|||||||
case HME.applyTheme:
|
case HME.applyTheme:
|
||||||
this.theme = evt.theme;
|
this.theme = evt.theme;
|
||||||
var numFormats = Object.keys( evt.theme.formats ).length;
|
var numFormats = Object.keys( evt.theme.formats ).length;
|
||||||
L( M2C(this.msgs.applyTheme.msg, evt.status === 'error' ? 'red' : 'green'),
|
L( M2C(this.msgs.applyTheme.msg, evt.status === 'error' ? 'red' : 'gray', evt.status === 'error' ? 'bold' : 'white.dim'),
|
||||||
evt.theme.name.toUpperCase(),
|
evt.theme.name.toUpperCase(),
|
||||||
numFormats, ( numFormats === 1 ? '' : 's') );
|
numFormats, ( numFormats === 1 ? '' : 's') );
|
||||||
break;
|
break;
|
||||||
@ -172,7 +175,7 @@ Output routines for HackMyResume.
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case HME.afterInlineConvert:
|
case HME.afterInlineConvert:
|
||||||
L( M2C( this.msgs.afterInlineConvert.msg, 'green'),
|
L( M2C( this.msgs.afterInlineConvert.msg, 'gray', 'white.dim' ),
|
||||||
evt.file, evt.fmt );
|
evt.file, evt.fmt );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -10,8 +10,9 @@ Inline Markdown-to-Chalk conversion routines.
|
|||||||
var CHALK = require('chalk');
|
var CHALK = require('chalk');
|
||||||
var LO = require('lodash');
|
var LO = require('lodash');
|
||||||
|
|
||||||
module.exports = function( v, style ) {
|
module.exports = function( v, style, boldStyle ) {
|
||||||
var temp = v.replace(/\*\*(.*?)\*\*/g, CHALK.bold('$1'));
|
boldStyle = boldStyle || 'bold';
|
||||||
|
var temp = v.replace(/\*\*(.*?)\*\*/g, LO.get( CHALK, boldStyle )('$1'));
|
||||||
return style ? LO.get( CHALK, style )(temp) : temp;
|
return style ? LO.get( CHALK, style )(temp) : temp;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user