yakivmospan / github-wikito-converter

Generate HTML & PDF documentation from Github wiki or any other markdown-based wiki.
Other
296 stars 52 forks source link

Unhandled rejection error #32

Closed shreedhan closed 6 years ago

shreedhan commented 6 years ago

Unable to convert Google Guava wiki at https://github.com/google/guava/wiki

$ gwtc ./guava.wiki 
Unhandled rejection Error: Unknown language: "buildr"
Please report this to https://github.com/markedjs/marked.
    at Object.highlight (/usr/lib/node_modules/github-wikito-converter/node_modules/highlight.js/lib/highlight.js:506:13)
    at Renderer.mainRenderer.code (/usr/lib/node_modules/github-wikito-converter/dist/markdown.js:34:79)
    at Parser.tok (/usr/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:1058:28)
    at Parser.parse (/usr/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:1003:17)
    at Function.Parser.parse (/usr/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:985:17)
    at marked (/usr/lib/node_modules/github-wikito-converter/node_modules/marked/lib/marked.js:1322:19)
    at Markdown.convertMarkdownString (/usr/lib/node_modules/github-wikito-converter/dist/markdown.js:109:14)
    at Markdown.convertMarkdownFile (/usr/lib/node_modules/github-wikito-converter/dist/markdown.js:116:19)
    at WikiConverter.<anonymous> (/usr/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:87:41)
    at Array.forEach (<anonymous>)
    at WikiConverter.computePages (/usr/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:83:27)
    at WikiConverter.getPages (/usr/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:96:14)
    at HtmlWriter.write (/usr/lib/node_modules/github-wikito-converter/dist/html-writer.js:33:34)
    at WikiConverter.<anonymous> (/usr/lib/node_modules/github-wikito-converter/dist/wiki-converter.js:60:43)
    at tryCatcher (/usr/lib/node_modules/github-wikito-converter/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/usr/lib/node_modules/github-wikito-converter/node_modules/bluebird/js/main/promise.js:510:31)
shreedhan commented 6 years ago

Looks like it's because of code snippets which highlight.js does not recognize. The wiki mentioned above has buildr and proguard as code language. Replacing them with shell worked for me.