This repository has been archived on 2018-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
node-task/node_modules/mysql2/node_modules/cardinal/examples/highlight-self.js

17 lines
462 B
JavaScript

// This file will highlight itself using the default theme when run via: "node highlight-self"
var cardinal = require('..');
function highlight () {
// Using the asynchronous highlightFile()
// For synchronous highlighting use: highlightFileSync() - see highlight-self-hide-semicolons.js
cardinal.highlightFile(__filename, { linenos: true }, function (err, res) {
if (err) return console.error(err);
console.log(res);
});
}
highlight();