You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
c:\dev\testNode>node test.js
c:\dev\testNode\node_modules\marked\lib\marked.js:1226
throw e;
^
TypeError: undefined is not a function
Please report this to https://github.com/chjj/marked.
at Lexer.lex (c:\dev\testNode\node_modules\marked\lib\marked.js:138:6)
at Function.Lexer.lex (c:\dev\testNode\node_modules\marked\lib\marked.js:129
:16)
at marked (c:\dev\testNode\node_modules\marked\lib\marked.js:1218:31)
at Object.<anonymous> (c:\dev\testNode\test.js:17:16)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
Here is test file i ran:
var fs = require('fs');
var marked = require('marked');
marked.setOptions({
renderer: new marked.Renderer(),
gfm: true,
tables: true,
breaks: false,
pedantic: false,
sanitize: true,
smartLists: true,
smartypants: false
});
//console.log(marked('I am using __markdown__.'));
var mdString = fs.readFileSync('test.md');
var markedUp = marked(mdString);
fs.writeFile('test.html',markedUp,function(err){
if(err) {
console.log('ERROR:');
console.log(err);
return;
}
console.log('wrote file output');
});
The text was updated successfully, but these errors were encountered:
Learning marked, tried some of the examples in the README file, edited one to read the README.md contents from:
https://raw.githubusercontent.com/chjj/marked/master/README.md
I get this error/trace from marked on parse:
Here is test file i ran:
The text was updated successfully, but these errors were encountered: