1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-12-23 13:47:22 +00:00

Tweak Markdownification.

This commit is contained in:
devlinjd 2015-12-09 04:32:39 -05:00
parent 857de65750
commit 3dcf3c3974
2 changed files with 8 additions and 3 deletions

View File

@ -78,7 +78,8 @@ Definition of the FRESHResume class.
},
/**
Create a copy of this resume in which all fields have been interpreted as
Markdown.
*/
FreshResume.prototype.markdownify = function() {
@ -108,7 +109,11 @@ Definition of the FRESHResume class.
Object.keys( obj ).forEach(function(key) {
var sub = obj[key];
if( typeof sub === 'string' || sub instanceof String ) {
if( key !== 'url' )
if( _.contains(['skills','url','start','end','date'], key) )
return;
if( key === 'summary' )
obj[key] = MD( obj[key] );
else
obj[key] = inline ? MDIN( obj[key] ) : MD( obj[key] );
}
else

View File

@ -23,7 +23,7 @@ Underscore template generate for FluentCV.
// Compile and run the template. TODO: avoid unnecessary recompiles.
var compiled = _.template(jst);
var ret = compiled({
r: json.markdownify(),
r: format === 'html' || format === 'pdf' ? json.markdownify() : json,
filt: opts.filters,
XML: require('xml-escape'),
RAW: json,