lib/output/modifiers/highlightCode.js
function getLanguageForClass(classNames) {
    return Immutable.List(classNames)
        .map(function(cl) {
            // Markdown
            if (cl.search('lang-') === 0) {
                return cl.slice('lang-'.length);
            }

            // Asciidoc
            if (cl.search('language-') === 0) {
                return cl.slice('language-'.length);
            }

            return null;
        })
        .find(function(cl) {
            return Boolean(cl);
        });
}
function getLanguageForClass(classNames) {
    return Immutable.List(classNames)
        .map(function(cl) {
            // Markdown
            if (cl.search('lang-') === 0) {
                return cl.slice('lang-'.length);
            }

            // Asciidoc
            if (cl.search('language-') === 0) {
                return cl.slice('language-'.length);
            }

            return null;
        })
        .find(function(cl) {
            return Boolean(cl);
        });
}
function getLanguageForClass ( classNames ) { return Immutable . List ( classNames ) . map ( function ( cl ) { // Markdown if ( cl . search ( 'lang-' ) === 0 ) { return cl . slice ( 'lang-' . length ) ; } // Asciidoc if ( cl . search ( 'language-' ) === 0 ) { return cl . slice ( 'language-' . length ) ; } return null ; } ) . find ( function ( cl ) { return Boolean ( cl ) ; } ) ; }
Return language for a code blocks from a list of class names

@param {Array<String>}
@return {String}
Return language for a code blocks from a list of class names