diff --git a/src/Converter.php b/src/Converter.php
index f4b3758..7acaf94 100644
--- a/src/Converter.php
+++ b/src/Converter.php
@@ -1360,7 +1360,7 @@ protected function fixBlockElementSpacing()
*/
protected function fixInlineElementSpacing()
{
- if ($this->parser->isStartTag) {
+ if ($this->parser->isStartTag && !$this->parser->isEmptyTag) {
// move spaces after the start element to before the element
if (preg_match('~^(\s+)~', $this->parser->html, $matches)) {
$this->out($matches[1]);
diff --git a/test/ConverterTestCase.php b/test/ConverterTestCase.php
index f0ed30f..05580fd 100644
--- a/test/ConverterTestCase.php
+++ b/test/ConverterTestCase.php
@@ -486,7 +486,7 @@ public function providerFixBreaks()
$data['break1']['html'] = "Hello,
How are you doing?";
$data['break1']['md'] = "**Hello, \nHow are you doing?**";
$data['break2']['html'] = "Hey,
How you're doing?
Sorry
You can't get through";
- $data['break2']['md'] = "**Hey, \nHow you're doing?** \n \n**Sorry \n \nYou can't get through**";
+ $data['break2']['md'] = "**Hey, \nHow you're doing?** \n \n**Sorry \n \nYou can't get through**";
return $data;
}