update the code block page, add tests

This commit is contained in:
Hans Pagel
2020-09-10 17:29:34 +02:00
parent d1ea1da0cc
commit b3297f05c2
4 changed files with 63 additions and 4 deletions

View File

@@ -36,8 +36,19 @@ export default {
CodeBlock(),
],
content: `
<p>This is a code block:</p>
<pre><code>const foo = 'bar'</code></pre>
<p>Thats a boring paragraph followed by a fenced code block:</p>
<pre><code>for (var i=1; i <= 20; i++)
{
if (i % 15 == 0)
console.log("FizzBuzz");
else if (i % 3 == 0)
console.log("Fizz");
else if (i % 5 == 0)
console.log("Buzz");
else
console.log(i);
}</code></pre>
<p>Press Command/Ctrl + Enter to leave the fenced code block and continue typing in boring paragraphs.
`,
})