1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 10:52:47 +00:00

Added files

This commit is contained in:
2015-06-25 16:28:41 -05:00
parent 656dca9289
commit eb27b55a54
5621 changed files with 1630154 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
(function () {
"use strict";
var Highlight = require("../lib/highlight.js")
, assert = require('assert')
, fs = require('fs')
, reHasAnnotations = /\sclass="tag"/
;
function runTest(err) {
assert.ok(!err, err && err.message);
assert.strictEqual(1, Highlight.loadedLanguages.length, 'more than one language is loaded: ' + Highlight.loadedLanguages);
assert.strictEqual('xml', Highlight.loadedLanguages[0], 'xml isn\'t the language');
fs.readFile('./example.html', 'utf8', function (err, text) {
var annotated
;
assert.ok(!err, 'threw error reading example.html');
annotated = Highlight.highlight(text, ' ');
assert.ok(annotated.match(reHasAnnotations));
//console.log(annotated);
console.info('[PASS] source is annotated');
});
}
Highlight.init(runTest, ['xml']);
}());