Exemplo n.º 1
0
 var Page = function(text){
     text = (text || '').trim();
     markdown.converter();
     this.text = markdown.makeHtml(text);
     this.$dom = $('<div>').addClass('slider-page').html(this.text);
     this.$dom.find('a[href]').attr('target', '_blank');
 };
Exemplo n.º 2
0
Arquivo: tmd.js Projeto: yuest/tmd.js
 fs.readFile(mdfilepath, 'utf8', function (err, mdstr) {
     if (err) return cb('not found');
     var html = markdown.makeHtml(mdstr)
       , title = html.match(/<h1>(.*)<\/h1>/);
       ;
     title = title ? title[1] : path.basename( mdfilepath);
     cb(null, tp[tpind]({ title: title, content: html}));
 });