mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-04 05:17:08 +01:00
Support basic Markdown in MS Word docs.
This commit is contained in:
@ -9,6 +9,8 @@ Handlebars template generate for FluentCV.
|
||||
var HANDLEBARS = require('handlebars');
|
||||
var FS = require('fs');
|
||||
var moment = require('moment');
|
||||
var MD = require('marked');
|
||||
var H2W = require('../utils/html-to-wpml');
|
||||
|
||||
module.exports = function( json, jst, format, cssInfo, opts, theme ) {
|
||||
|
||||
@ -27,6 +29,13 @@ Handlebars template generate for FluentCV.
|
||||
}
|
||||
});
|
||||
|
||||
HANDLEBARS.registerHelper("wpml", function( txt, inline ) {
|
||||
inline = (inline && !inline.hash) || false;
|
||||
txt = inline ? MD(txt.trim()).replace(/^\s*<p>|<\/p>\s*$/gi, '') : MD(txt.trim());
|
||||
txt = H2W( txt.trim() );
|
||||
return txt;
|
||||
});
|
||||
|
||||
// http://doginthehat.com.au/2012/02/comparison-block-helper-for-handlebars-templates/
|
||||
HANDLEBARS.registerHelper('compare', function(lvalue, rvalue, options) {
|
||||
|
||||
|
Reference in New Issue
Block a user