Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

break with marked@0.3.4 #18

Closed
tgfjt opened this issue Jul 30, 2015 · 3 comments
Closed

break with marked@0.3.4 #18

tgfjt opened this issue Jul 30, 2015 · 3 comments

Comments

@tgfjt
Copy link

tgfjt commented Jul 30, 2015

Hi.:smile_cat:

I got Error below:

/Users/tgfjt/workspace/marked-sample/node_modules/marked/lib/marked.js:1226
    throw e;
          ^
TypeError: this.renderer.text is not a function
Please report this to https://github.com/chjj/marked.
    at InlineLexer.output (/Users/tgfjt/workspace/marked-sample/node_modules/marked/lib/marked.js:685:28)
    at Parser.tok (/Users/tgfjt/workspace/marked-sample/node_modules/marked/lib/marked.js:985:21)
    at Parser.parse (/Users/tgfjt/workspace/marked-sample/node_modules/marked/lib/marked.js:935:17)
    at Function.Parser.parse (/Users/tgfjt/workspace/marked-sample/node_modules/marked/lib/marked.js:922:17)
    at marked (/Users/tgfjt/workspace/marked-sample/node_modules/marked/lib/marked.js:1218:19)
    at Object.<anonymous> (/Users/tgfjt/workspace/marked-sample/sample.js:10:13)
    at Module._compile (module.js:430:26)
    at Object.Module._extensions..js (module.js:448:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

sample.js:

var marked = require('marked');
var TerminalRenderer = require('marked-terminal');

marked.setOptions({
  renderer: new TerminalRenderer()
});

console.log(marked('# Hello  This is **markdown** printed in the `terminal`'));

This code works successfully on marked v0.3.3.

This issue is caused by new method renderer.text on marked v0.3.4.
https://github.com/chjj/marked/blob/master/lib/marked.js#L685

@mikaelbr
Copy link
Owner

Ah, thanks for letting me know. Fixed in v1.6.0:

➜  marked-terminal git:(master) npm publish
+ marked-terminal@1.6.0

@tgfjt
Copy link
Author

tgfjt commented Jul 30, 2015

Thanks for you fixing so quickly! 🎉

@tgfjt tgfjt closed this as completed Jul 30, 2015
@finnp
Copy link

finnp commented Jul 30, 2015

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants