You are not doing anything wrong here. This was an oversight when htmltools was originally created. We are aware of the issue and are trying to come up with a way to maintain old behavior while behaving as you'd expect it to behave.
This produces the html below, which will be displayed with the extra whitespace.
> p("Some ", strong("forma", em("tted")), " text")
<p>
Some
<strong>
forma
<em>tted</em>
</strong>
text
</p>
While not the prettiest, you can use the code below:
> p("Some ", strong(HTML(paste0("forma", em("tted")))), " text")
<p>
Some
<strong>forma<em>tted</em></strong>
text
</p>
HTML is used to preserve the html tags. paste0 is used to collect the character values with no spaces.