Ticket/InsdepUI/plugin/highlight-9.9.0/test/special/explicitLanguage.js
(完整代码) 1KB'use strict';
let utility = require('../utility');
describe('explicit language class', function() {
before(function() {
const filename = utility.buildPath('fixtures', 'expect', 'explicit1.txt'),
testHTML = document.querySelectorAll('#explicit-language .hljs');
return utility.setupFile(filename, 'utf-8', this, testHTML);
});
it('should highlight block with language in code tag', function() {
const actual = this.blocks[0];
actual.should.equal(this.expected);
});
it('should highlight block with language in pre tag', function() {
const actual = this.blocks[1];
actual.should.equal(this.expected);
});
it('should highlight using html 5 style (language-*)', function() {
const actual = this.blocks[2];
actual.should.equal(this.expected);
});
it('should highlight with shortened prefix (lang-)', function() {
const filename = utility.buildPath('fixtures', 'expect', 'explicit2.txt'),
actual = this.blocks[3];
return utility.expectedFile(filename, 'utf-8', actual);
});
it('should highlight if classname contains uppercase symbols', function() {
const filename = utility.buildPath('fixtures', 'expect', 'explicit2.txt'),
actual = this.blocks[4];
return utility.expectedFile(filename, 'utf-8', actual);
});
});
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。