I want to be able to show a code example in my Svelte component, but the example has curly braces, i.e
<script>
//no JS needed
</script>
<p>Here's a sample function</p>
<pre><code>
function test(e) {
console.log(e)
}
</code></pre>
Notice how the function has curly braces? That seems to be confusing the Svelte compiler. Is there a way to escape those other than this?
<script>
//no JS needed
</script>
<p>Here's a sample function</p>
<pre><code>
function test(e) {'{'}
console.log(e)
{'}'}
</code></pre>