1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-04 05:17:08 +01:00

add: png format

This commit is contained in:
Ya Zhuang
2015-12-29 03:29:13 +08:00
parent dfa19899b0
commit 6b0ea0c7bd
7 changed files with 56 additions and 4 deletions

View File

@ -36,7 +36,7 @@ Definition of the HandlebarsGenerator class.
// Compile and run the Handlebars template.
var template = HANDLEBARS.compile(jst);
return template({
r: format === 'html' || format === 'pdf' ? json.markdownify() : json,
r: format === 'html' || format === 'pdf' || format === 'png' ? json.markdownify() : json,
RAW: json,
filt: opts.filters,
cssInfo: cssInfo,

View File

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