How to use the node-markdown.Markdown function in node-markdown

To help you get started, we’ve selected a few node-markdown examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jdan / cleaver / lib / render.js View on Github external
fs.readFile(Cleaver.ROOT_DIR + 'templates/_' + slideData.type + '.mustache', 'utf8', function (err, template) {
    if (err) deferred.reject(err);
    if (slideData.type == 'text') {
      // replace &gt;&gt; with <p></p><p>
      // jank.
      slideData.content = md(slideData.content.replace(/&gt;&gt;/g, '</p><p>'));
    }

    deferred.resolve(mustache.render(template, slideData));
  });
</p>
github xenophy / ext-server / docs / api.conf / trans.js View on Github external
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)
                );
            };
github Teal / TealUI / tools / node / node_modules2 / utilskit / parsers.js View on Github external
parseMarkDown: function(content, options, callback){
		var markdown = require('node-markdown');
		content = markdown.Markdown(content.toString(), options);
		callback(content);
	},
github Teal / TealUI / tools / node / node_modules2 / xuld-webserver / handlers / markdownhandler.js View on Github external
function parseMarkDownSync(content, options){
	var markdown = require('node-markdown');
	return markdown.Markdown(content.toString(), options);
}
github gschier / simple-blog / models / Post.js View on Github external
md: { type: String, required: true, set: function(markdown) {
    this.body = md(markdown);
    return markdown;
  }},
  published: { type: Boolean, 'default': false },
github stackoverflow / blode / lib / main.js View on Github external
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};
};
github nodejitsu / handbook / build.js View on Github external
finder.on('end', function() {
  var html = md(output);
  fs.writeFileSync('./generated/index.html', html);
});
github clux / modul8 / build.js View on Github external
files.forEach(function (file) {
    var out = fs.readFileSync('../docs/' + file + '.md', 'utf8');
    fs.writeFileSync('./docs/' + file + '.html', head + md(out) + tail);
  });
}
github Zizzamia / ng-tasty / gruntfile.js View on Github external
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));
  }

node-markdown

Parse Markdown syntax with node.js

Unrecognized
Latest version published 12 years ago

Package Health Score

48 / 100
Full package analysis

Popular node-markdown functions

Similar packages