Lightbox adds extra line breaks

Another issue of the same kind, might be related:

Consider the following markdown:

[b]![50x50](https://images.unsplash.com/photo-1526047932273-341f2a7631f9)Should be bold[/b]

In the composer preview and in the cooked post if the image is too small to be lightboxed, the result is:
image
But, in the cooked post if the image is lightboxed, the result is:
image