We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6261ad commit 7ae1a17Copy full SHA for 7ae1a17
test/highlight.js
@@ -21,4 +21,19 @@ describe("Detect breaking changes in highlight.js", function() {
21
.then(done)
22
.done();
23
});
24
+
25
+ it('should return a safe code block for unrecognized languages', function (done) {
26
+ tester.builder()
27
+ .withContent('```foo\nif (foo <= bar) { console.log(\'Too bad, foo...\'); }\n```')
28
+ .withLocalPlugin(pluginDir)
29
+ .create()
30
+ .then(function(result) {
31
+ var expected = '<pre><code class="lang-foo">if (foo <= bar) { console.log('Too bad, foo...'); }\n</code></pre>';
32
+ if (result.get('index.html').content !== expected) {
33
+ throw new Error('Found ' + result[0].content + ' instead of ' + expected);
34
+ }
35
+ })
36
+ .then(done)
37
+ .done();
38
+ });
39
0 commit comments