Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
fs.readFile(Cleaver.ROOT_DIR + 'templates/_' + slideData.type + '.mustache', 'utf8', function (err, template) {
if (err) deferred.reject(err);
if (slideData.type == 'text') {
// replace >> with <p></p><p>
// jank.
slideData.content = md(slideData.content.replace(/>>/g, '</p><p>'));
}
deferred.resolve(mustache.render(template, slideData));
});
</p>
var deprecatedExecute = function(type, o, id) {
file = path.normalize(src + '/' + o.owner + '/' + type + '/' + o.name + '/deprecated.md');
try{
data = readLocale(file);
} catch(e) {
console.log(e);
data = '';
}
srctag = '{' + cls.replace(/\./g, '_') + ':' + id + ':deprecated}';
destjson.html = destjson.html.replace(
srctag,
markdown(data)
);
};
parseMarkDown: function(content, options, callback){
var markdown = require('node-markdown');
content = markdown.Markdown(content.toString(), options);
callback(content);
},
function parseMarkDownSync(content, options){
var markdown = require('node-markdown');
return markdown.Markdown(content.toString(), options);
}
md: { type: String, required: true, set: function(markdown) {
this.body = md(markdown);
return markdown;
}},
published: { type: Boolean, 'default': false },
var loadPost = function(fpath) {
var data = fs.readFileSync(fpath, "utf-8");
var defs = dotUtils.findDefs(data);
data = dot.template(data)();
return {"data": isHtml(fpath) ? data : md(data), "defs": defs};
};
finder.on('end', function() {
var html = md(output);
fs.writeFileSync('./generated/index.html', html);
});
files.forEach(function (file) {
var out = fs.readFileSync('../docs/' + file + '.md', 'utf8');
fs.writeFileSync('./docs/' + file + '.html', head + md(out) + tail);
});
}
function enquote(str) {
return '"' + str + '"';
}
var module = {
name: name,
moduleName: enquote('ngTasty.' + name),
displayName: ucwords(breakup(name, ' ')),
srcFiles: grunt.file.expand('src/'+name+'/*.js'),
tplFiles: grunt.file.expand('template/'+name+'/*.html'),
tpljsFiles: grunt.file.expand('template/'+name+'/*.html.js'),
tplModules: grunt.file.expand('template/'+name+'/*.html').map(enquote),
dependencies: dependenciesForModule(name),
docs: {
md: grunt.file.expand('src/'+name+'/docs/*.md')
.map(grunt.file.read).map(markdown).join('\n'),
js: grunt.file.expand('src/'+name+'/docs/*.js')
.map(grunt.file.read).join('\n'),
html: grunt.file.expand('src/'+name+'/docs/*.html')
.map(grunt.file.read).join('\n')
}
};
module.dependencies.forEach(findModule);
grunt.config('modules', grunt.config('modules').concat(module));
}