<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/AlecBoutin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/AlecBoutin">@AlecBoutin</a> on May 18, 2016 19:55</em></p>
<ul dir="auto">
<li>VSCode Version: 1.1</li>
</ul>
<p dir="auto">The .tsx/.jsx auto-formatter adds an unnecessary space on the end of certain dynamic attributes.</p>
<p dir="auto">E.g. <code class="notranslate">&lt;button id={fn()} /&gt;</code> becomes <code class="notranslate">&lt;button id={fn() } /&gt;</code> after the file is auto-formatted. A space is inserted after the closing parenthesis of the fn() call.</p>
<p dir="auto">The problem appears to be related to having parenthesis in the attribute.</p>
<p dir="auto">E.g. &lt;button id={""} /&gt; is left unchanged by auto-format. <code class="notranslate">&lt;button id={("")} /&gt;</code> becomes <code class="notranslate">&lt;button id={("") } /&gt;</code> (the space is inserted)</p>
<p dir="auto">I have also observed the auto-formatter preserves the spaces in the id attribute of <code class="notranslate">&lt;button id={ ("") } /&gt;</code></p>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="155587462" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/6498" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/6498/hovercard" href="https://github.com/microsoft/vscode/issues/6498">microsoft/vscode#6498</a></em></p>
<p dir="auto">When I format document a space is added before closing parenthesis.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/858180/12673144/383f4664-c67b-11e5-9307-c5343a1f1635.png"><img src="https://cloud.githubusercontent.com/assets/858180/12673144/383f4664-c67b-11e5-9307-c5343a1f1635.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">It should not be added.</p>