Ticket/InsdepUI/plugin/highlight-9.9.0/test/special/noHighlight.js
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
'use strict';
let _ = require('lodash');
describe('no highlighting', function() {
before(function() {
const testHTML = document.querySelectorAll('#no-highlight pre');
this.blocks = _.map(testHTML, 'children[0].innerHTML');
this.expected = {
html: '<div id="contents">\n ' +
'<p>Hello, World!\n</div>',
python: 'for x in [1, 2, 3]: count(x)',
javascript: '<span class="hljs-keyword">var</span> x = ' +
'<span class="hljs-string">\'foo\'</span>;'
};
});
it('should keep block unchanged (nohighlight)', function() {
const expected = this.expected.html,
actual = this.blocks[0];
actual.should.equal(expected);
});
it('should keep block unchanged (no-highlight)', function() {
const expected = this.expected.html,
actual = this.blocks[1];
actual.should.equal(expected);
});
it('should keep block unchanged (plain)', function() {
const expected = this.expected.html,
actual = this.blocks[2];
actual.should.equal(expected);
});
it('should keep block unchanged (text)', function() {
const expected = this.expected.html,
actual = this.blocks[3];
actual.should.equal(expected);
});
it('should skip pre tags without a child code tag', function() {
const expected = 'Computer output',
actual = this.blocks[4];
actual.should.equal(expected);
});
it('should keep block unchanged (unsupported language)', function() {
const expected = this.expected.python,
actual = this.blocks[5];
actual.should.equal(expected);
});
后面还有 28 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。