Ticket/InsdepUI/plugin/highlight-9.9.0/test/api/ident.js
(完整代码) 756B'use strict';
let hljs = require('../../build');
const pattern = new RegExp(`^${hljs.IDENT_RE}$`);
describe('.IDENT_RE', function() {
it('should match non-underscore starting words', function() {
const words = [ 'foo' , 'bar' , 'baz'
, 'Foo' , 'Bar' , 'Baz'
, 'f_oo', 'ba_r', 'baz_'
, 'F_oo', 'Ba_r', 'Baz_'
];
words.should.matchEach(pattern);
});
it('should not match underscore starting words', function() {
const words = [ '_foo' , '_bar' , '_baz'
, '_Foo' , '_Bar' , '_Baz'
, '_f_oo', '_ba_r', '_baz_'
, '_F_oo', '_Ba_r', '_Baz_'
];
words.should.not.matchEach(pattern);
});
});
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。