claudioc / jingo

Node.js based Wiki
MIT License
1.02k stars 182 forks source link

Server crash (Syntax highlighter) #11

Closed adun closed 11 years ago

adun commented 11 years ago

I'm getting an error with one of my wiki page:

Error: You need to pass a language obtained via "getLanguage"
Please report this to https://github.com/chjj/marked.
    at Object.highlight (/opt/jingo/node_modules/node-syntaxhighlighter/node-syntaxhighlighter.js:81:24)
    at Object.Marked.setOptions.highlight (/opt/jingo/lib/renderer.js:12:16)
    at Parser.tok (/opt/jingo/node_modules/marked/lib/marked.js:837:33)
    at Parser.parse (/opt/jingo/node_modules/marked/lib/marked.js:778:17)
    at Function.Parser.parse (/opt/jingo/node_modules/marked/lib/marked.js:765:17)
    at marked (/opt/jingo/node_modules/marked/lib/marked.js:1017:19)
    at Object.Renderer.render (/opt/jingo/lib/renderer.js:77:12)
    at exports.miscPreview (/opt/jingo/routes/index.js:423:23)
    at callbacks (/opt/jingo/node_modules/express/lib/router/index.js:161:37)
    at param (/opt/jingo/node_modules/express/lib/router/index.js:135:11)

I suspect yaml syntax.

claudioc commented 11 years ago

HI, can you please show me the config file and (eventually) the page (or at least the part of the page which craches). Feel free to use my email address: cld@ccl.me

Thanks!

adun commented 11 years ago

Please check your mails for the config file and full page details

Steps to reproduce

  • Preview the page
  • Server should have crashed
claudioc commented 11 years ago

It was indeed caused by using an unknown language for the syntax highlighter. I've fixed it and added a comment con the Readme to have the list of supported languages :)

Thanks :+1:

adun commented 11 years ago

You're welcome, it's my pleasure to improve this project.