Skip to content

Commit 241a038

Browse files
committed
Fix tests that broke with syntaxhighlight major version upgrade 2.0 to 3.0
1 parent 5fa0ea9 commit 241a038

File tree

1 file changed

+26
-18
lines changed

1 file changed

+26
-18
lines changed

test/TemplateRenderMarkdownTest.js

+26-18
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ var key = "value";
171171
\`\`\``);
172172
t.is(
173173
(await fn()).trim(),
174-
`<pre class="language-js"><code class="language-js"><span class="highlight-line"><span class="token keyword">var</span> key <span class="token operator">=</span> <span class="token string">"value"</span><span class="token punctuation">;</span></span></code></pre>`
174+
`<pre class="language-js"><code class="language-js"><span class="token keyword">var</span> key <span class="token operator">=</span> <span class="token string">"value"</span><span class="token punctuation">;</span></code></pre>`
175175
);
176176
});
177177

@@ -194,7 +194,7 @@ var key = "value";
194194
\`\`\``);
195195
t.is(
196196
(await fn()).trim(),
197-
`<pre class="language-js"><code class="language-js"><span class="highlight-line"><span class="token keyword">var</span> key <span class="token operator">=</span> <span class="token string">"value"</span><span class="token punctuation">;</span></span></code></pre>`
197+
`<pre class="language-js"><code class="language-js"><span class="token keyword">var</span> key <span class="token operator">=</span> <span class="token string">"value"</span><span class="token punctuation">;</span></code></pre>`
198198
);
199199
});
200200

@@ -257,10 +257,12 @@ test("Markdown Render: use Markdown inside of a Liquid shortcode (Issue #536)",
257257
let fn = await tr.getCompiledTemplate(`# {{title}}
258258
{% testShortcode %}`);
259259
t.is(
260-
(await fn({
261-
title: "My Title",
262-
otherTitle: "My Other Title"
263-
})).trim(),
260+
(
261+
await fn({
262+
title: "My Title",
263+
otherTitle: "My Other Title"
264+
})
265+
).trim(),
264266
`<h1>My Title</h1>
265267
<h2>My Other Title</h2>`
266268
);
@@ -279,10 +281,12 @@ test("Markdown Render: use Markdown inside of a Nunjucks shortcode (Issue #536)"
279281
let fn = await tr.getCompiledTemplate(`# {{title}}
280282
{% testShortcode %}`);
281283
t.is(
282-
(await fn({
283-
title: "My Title",
284-
otherTitle: "My Other Title"
285-
})).trim(),
284+
(
285+
await fn({
286+
title: "My Title",
287+
otherTitle: "My Other Title"
288+
})
289+
).trim(),
286290
`<h1>My Title</h1>
287291
<h2>My Other Title</h2>`
288292
);
@@ -301,10 +305,12 @@ test("Markdown Render: use Markdown inside of a Liquid paired shortcode (Issue #
301305
let fn = await tr.getCompiledTemplate(`# {{title}}
302306
{% testShortcode %}## My Other Title{% endtestShortcode %}`);
303307
t.is(
304-
(await fn({
305-
title: "My Title",
306-
otherTitle: "My Other Title"
307-
})).trim(),
308+
(
309+
await fn({
310+
title: "My Title",
311+
otherTitle: "My Other Title"
312+
})
313+
).trim(),
308314
`<h1>My Title</h1>
309315
<h2>My Other Title</h2>`
310316
);
@@ -323,10 +329,12 @@ test("Markdown Render: use Markdown inside of a Nunjucks paired shortcode (Issue
323329
let fn = await tr.getCompiledTemplate(`# {{title}}
324330
{% testShortcode %}## My Other Title{% endtestShortcode %}`);
325331
t.is(
326-
(await fn({
327-
title: "My Title",
328-
otherTitle: "My Other Title"
329-
})).trim(),
332+
(
333+
await fn({
334+
title: "My Title",
335+
otherTitle: "My Other Title"
336+
})
337+
).trim(),
330338
`<h1>My Title</h1>
331339
<h2>My Other Title</h2>`
332340
);

0 commit comments

Comments
 (0)