Mods/node_modules/cardinal/examples/highlight-string.js
oitsjustjose 6b60015c02 --
2017-02-26 17:06:42 -05:00

14 lines
262 B
JavaScript

// This file will highlight the passed code using the custom theme when run via: "node highlight-string"
var cardinal = require('..');
var code = '' +
function add (a, b) {
var sum = a + b;
return sum;
} +
'';
console.log(cardinal.highlight(code));