Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion test/ConverterTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ public function providerFixBreaks()
$data['break1']['html'] = "<strong>Hello,<br>How are you doing?</strong>";
$data['break1']['md'] = "**Hello, \nHow are you doing?**";
$data['break2']['html'] = "<b>Hey,<br> How you're doing?</b><br><br><b>Sorry<br><br> You can't get through</b>";
$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;
}
Expand Down