I also found these lines annoying. I found this css snippet, it removes the lines of embedded parts and you can play with the margins on the top and bottom:
.markdown-preview-view .markdown-embed { border: none; padding:0em; margin:0em; }
.markdown-preview-view .markdown-embed-content { max-height: unset;}
.markdown-preview-view .markdown-embed-content>:first-child { margin-top: 10px; }
.markdown-preview-view .markdown-embed-content>:last-child { margin-bottom: 10px; }
Maybe it works for you as well.