<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function fn() {}
`blah${fn()}blah`
// actual:
`blah${fn() }blah`
// expected:
`blah${fn()}blah`"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">fn</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-s">`blah<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-en">fn</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">}</span></span>blah`</span>
<span class="pl-c">// actual:</span>
<span class="pl-s">`blah<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-en">fn</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">}</span></span>blah`</span>
<span class="pl-c">// expected:</span>
<span class="pl-s">`blah<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-en">fn</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">}</span></span>blah`</span></pre></div>
<p dir="auto">This is what I get after Ctrl+K+D in VS:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="throw Error(`${JSON.stringify(this.value) } cannot be found in ${JSON.stringify(y) }`);"><pre class="notranslate"><span class="pl-k">throw</span> <span class="pl-smi">Error</span><span class="pl-kos">(</span><span class="pl-s">`<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-smi">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">)</span> <span class="pl-kos">}</span></span> cannot be found in <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-smi">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">y</span><span class="pl-kos">)</span> <span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">As you see, a space was inserted after <code class="notranslate">JSON.stringify(...)</code>. The bug doesn't appear if a plain variable is used: <code class="notranslate">${x}</code>.</p>