'use strict';
const hljs = require('../../build');
hljs.debugMode();
describe("bugs", function() {
describe("resume scan when a match is ignored", () => {
it("should continue to highlight later matches", () => {
const result = hljs.highlight('ImmutablePair.of(Stuff.class, "bar")', {language: 'java'});
result.value.should.equal(
'ImmutablePair.of(Stuff.class, <span class="hljs-string">"bar"</span>)'
);
});
it("BUT should not skip ahead too far", () => {
const result = hljs.highlight('ImmutablePair.of(Stuff.class, "bar");\n23', {language: 'java'});
result.value.should.equal(
'ImmutablePair.of(Stuff.class, <span class="hljs-string">"bar"</span>);\n' +
'<span class="hljs-number">23</span>'
);
});
});
});