# Extra spaces added to markdown with rich text pasted

**URL:** <https://meta.discourse.org/t/extra-spaces-added-to-markdown-with-rich-text-pasted/112769>\
**Category:** Bug\
**Created:** [March 28, 2019, 2:02am UTC](https://meta.discourse.org/t/extra-spaces-added-to-markdown-with-rich-text-pasted/112769 "2019-03-28T02:02:09Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![StevenTammen](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@StevenTammen](https://meta.discourse.org/u/StevenTammen)\
**Post date:** [September 22, 2019, 9:15pm UTC](https://meta.discourse.org/t/extra-spaces-added-to-markdown-with-rich-text-pasted/112769/4 "2019-09-22T21:15:22Z")

</div>

I’ve tested this issue pasting text copied from email (Gmail), Google Docs, Microsoft Word, and ordinary HTML webpages – all these content sources lead to extra spaces being added around bold and italic text. Inline code blocks also have extra spaces added, but strike-through text does not. For example, if I paste text off of my website into the editor, here’s what happens:

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/2/7225580fe1b822f9317f7606b7a0252c7cdc5e48.png)

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/9/7991d90bfd98e6ef227448caca78bfc164649143.png)

Since the automatic conversion into WYSIWYG Markdown is so handy, I’ve found myself pasting into the editor and then using a regular expression in a different program (e.g., Vim, Notepad++) to remove the extra spaces, and then pasting back. It’s a bit hackish, but still easier than saving a file and using Pandoc to get the Markdown.

So long as adding the spaces isn’t somehow required for RTF/HTML pasting, it would be a good thing _not_ to add them, right?

---

_[View the full topic](https://meta.discourse.org/t/extra-spaces-added-to-markdown-with-rich-text-pasted/112769)._
