title: Removing whitespace between nav-item dropdown, default behavior not working properly
body: <p>I'm trying to add the bootstrap menu on the header in the application, almost everything is ok, but when using on <code>&lt;nav&gt;</code> the <code>&lt;li class='nav-item dropdown'&gt;</code>, it adds an empty space and doesn't collapse on responsive mode.</p>
  
  <p>I added a simple menu with brand on right side, with the following structure:</p>
  
  <pre class="lang-none prettyprint-override"><code>&gt;Menu
  --Home
  --Link
  --Dropdown
  ---Action
  ---Another action
  ---Something else
  --Another dropdown
  ---Action
  ---Another action
  ---Something else
  --Disabled
  &gt;Brand
  </code></pre>
  
  <p>In desktop mode, the menu is being shown properly.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/&gt;
  &lt;nav class="navbar navbar-expand-lg navbar-light bg-light"&gt;
          &lt;button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"&gt;
              &lt;span class="navbar-toggler-icon"&gt;&lt;/span&gt;
          &lt;/button&gt;
      
          &lt;div class="collapse navbar-collapse" id="navbarSupportedContent"&gt;
              &lt;ul class="navbar-nav mr-auto"&gt;
                  &lt;li class="nav-item active"&gt;
                      &lt;a class="nav-link" href="#"&gt;Home &lt;span class="sr-only"&gt;(current)&lt;/span&gt;&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link" href="#"&gt;Link&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item dropdown"&gt;
                      &lt;a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"&gt;
                          Dropdown
                      &lt;/a&gt;
                      &lt;div class="dropdown-menu" aria-labelledby="navbarDropdown"&gt;
                          &lt;a class="dropdown-item" href="#"&gt;Action&lt;/a&gt;
                          &lt;a class="dropdown-item" href="#"&gt;Another action&lt;/a&gt;
                          &lt;div class="dropdown-divider"&gt;&lt;/div&gt;
                          &lt;a class="dropdown-item" href="#"&gt;Something else here&lt;/a&gt;
                      &lt;/div&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item dropdown"&gt;
                      &lt;a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"&gt;
                          Another dropdown
                      &lt;/a&gt;
                      &lt;div class="dropdown-menu" aria-labelledby="navbarDropdown"&gt;
                          &lt;a class="dropdown-item" href="#"&gt;Action&lt;/a&gt;
                          &lt;a class="dropdown-item" href="#"&gt;Another action&lt;/a&gt;
                          &lt;div class="dropdown-divider"&gt;&lt;/div&gt;
                          &lt;a class="dropdown-item" href="#"&gt;Something else here&lt;/a&gt;
                      &lt;/div&gt;
                  &lt;/li&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link disabled" href="#"&gt;Disabled&lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
              &lt;a class="navbar-brand" href="#"&gt;Navbar&lt;/a&gt;
          &lt;/div&gt;
      &lt;/nav&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>My output needs to be like this:</p>
  
  <p><a href="https://i.stack.imgur.com/WXGiq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WXGiq.png" alt="Target"></a></p>
  
  <p>Instead, I'm getting this:</p>
  
  <p><a href="https://i.stack.imgur.com/KiSK0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KiSK0.png" alt="Current"></a></p>