--
This commit is contained in:
parent
24f3d27984
commit
6b60015c02
9588 changed files with 1149251 additions and 49 deletions
16
node_modules/cardinal/examples/highlight-self.js
generated
vendored
Normal file
16
node_modules/cardinal/examples/highlight-self.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// 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();
|
||||
Loading…
Reference in a new issue