Relevance highlight.js language definition now on npm

I just added the hljs-bigfix-relevance package to npm that allows you to use highlight.js to colorize relevance. You can use it like:

var hljs = require('highlight.js');
hljs.registerLanguage('bigfix-relevance', require('hljs-bigfix-relevance'));
 
function highlightRelevance(relevance) {
  return hljs.highlight('bigfix-relevance', relevance).value;
}

If you display relevance on a web page, you can use this to colorize it.

2 Likes

Thanks! Super useful.

Related: