# Discourse converts copy-pasted tab-delimited list into table automatically

**URL:** <https://meta.discourse.org/t/discourse-converts-copy-pasted-tab-delimited-list-into-table-automatically/266325>\
**Category:** Bug\
**Tags:** pr-welcome\
**Created:** [May 26, 2023, 2:46pm UTC](https://meta.discourse.org/t/discourse-converts-copy-pasted-tab-delimited-list-into-table-automatically/266325 "2023-05-26T14:46:00Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [May 26, 2023, 4:35pm UTC](https://meta.discourse.org/t/discourse-converts-copy-pasted-tab-delimited-list-into-table-automatically/266325/7 "2023-05-26T16:35:39Z")

</div>

When copying the text from the page by drag-selecting it I get:

> ![image](https://global.discourse-cdn.com/meta/original/4X/5/c/f/5cfb3b693f95e46b6bfea52dc59a43f1ffba7e4e.png)

But copying it using the copy button:

> ![image](https://global.discourse-cdn.com/meta/original/4X/9/c/9/9c9ab5f2a56cf20cdb31163029d640537a0d84f7.png)

I properly get just the expected text upon pasting.

Clipboard contents using the “copy” button are:

````plaintext
TEXT:
b'```sh\n\tsystemctl reboot\n\t```'
text/plain:
b'```sh\n\tsystemctl reboot\n\t```'

````

Clipboard contents by drag-selecting it on the page are:

````plaintext
TEXT:
b'\t```sh\n\tsystemctl reboot\n\t```'
text/html:
b'<span style="color: rgb(199, 199, 199); font-family: Consolas, Menlo, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; font-size: 17.008px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(60, 60, 60); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">\t```sh\n\tsystemctl reboot\n\t```</span>'
text/plain:
b'\t```sh\n\tsystemctl reboot\n\t```'

````

It’s probably that tab stop at the beginning of each line confusing things - perhaps if while parsing clipboard contents the first column is _always_ empty we don’t treat it as a list.

This seems a bit of a pathological situation - is there a natural situation where it comes up? Normally there won’t be tab stop characters in posts.

> [@roke\_julian\_lockhart](#):
>
> it’s obviously a list, not a table

To a computer it looks exactly like a tab-delimited table with a blank first column.

---

_[View the full topic](https://meta.discourse.org/t/discourse-converts-copy-pasted-tab-delimited-list-into-table-automatically/266325)._
