Skip to content

Loading…

use "marked" to provide additional data #56

Closed
tj opened this Issue · 4 comments

3 participants

@tj
Owner
tj commented

https://github.com/chjj/marked

he exposes the parser so we can leverage this to expose granular data, great for more opinionated HTML output

@ForbesLindesay

For even more awesomeness, consider using highlight.js (recently released a node package on npm) and the following code as the highlight option for marked.

function (code, lang) {
    //Source: http://softwaremaniacs.org/soft/highlight/en/download/
    //Docs: http://softwaremaniacs.org/wiki/doku.php/highlight.js:api
    var hljs = require("highlight.js");
    if(lang){
        try {
            return hljs.highlight(lang, code).value;
        } catch (ex) {
            //unrecognised language, fall through to automatted method.
        }
    }
    return hljs.highlightAuto(code).value;
}

Would need to be an option, so you still support people doing their own highlighting.

@tj
Owner
tj commented

it could just produce different properties that people can use in the templates, or an option yeah I'd be fine with that

@ForbesLindesay

Although in a way I like the idea of just producing lots of different properties, I'm concerned about duplicated work (I plan on running a hosted dox based service)

@evindor
Collaborator

We are using it now.

@evindor evindor closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.