fix(code-snippet): remove whitespace from pre tag (#1088)

Svelte v3.46.4 preserves whitespace inside `pre` tags by default; this removes whitespace from inside the `pre` tag in `CodeSnippet`.
This commit is contained in:
metonym 2022-02-11 16:56:46 -08:00 committed by GitHub
commit 2f556cdda3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -190,9 +190,7 @@
class:bx--snippet-container="{true}" class:bx--snippet-container="{true}"
style="width: 100%; min-height: {minHeight}px; max-height: {maxHeight}" style="width: 100%; min-height: {minHeight}px; max-height: {maxHeight}"
> >
<pre bind:this="{ref}"> <pre bind:this="{ref}"><code><slot>{code}</slot></code></pre>
<code><slot>{code}</slot></code>
</pre>
</div> </div>
{#if !hideCopyButton} {#if !hideCopyButton}
<CopyButton <CopyButton