# Editing a table whose some rows don't start with a pipe duplicate these rows

**URL:** https://meta.discourse.org/t/editing-a-table-whose-some-rows-dont-start-with-a-pipe-duplicate-these-rows/268475
**Category:** Bug
**Tags:** pr-welcome, table-builder
**Created:** [June 15, 2023, 3:30pm UTC](https://meta.discourse.org/t/editing-a-table-whose-some-rows-dont-start-with-a-pipe-duplicate-these-rows/268475 "2023-06-15T15:30:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [June 15, 2023, 3:30pm UTC](https://meta.discourse.org/t/editing-a-table-whose-some-rows-dont-start-with-a-pipe-duplicate-these-rows/268475/1 "2023-06-15T15:30:53Z")

</div>

Markdown table supports a syntax where first columns don’t start with a pipe (and last columns don’t end with one).

This is a valid table 👇

```plaintext
icon | description | content |
-|-|-|
:discourse2: | **Summary** | **Discourse OpenID Connect** allows an OpenID Connect provider to be used as an authentication provider for Discourse. 
:hammer_and_wrench: | **Repository Link** | <https://github.com/discourse/discourse-openid-connect>
:open_book: | **Install Guide** | [How to install plugins in Discourse](https://meta.discourse.org/t/install-plugins-in-discourse/19157)

```

It renders as:

| icon | description | content |
| --- | --- | --- |
| :discourse2: | **Summary** | **Discourse OpenID Connect** allows an OpenID Connect provider to be used as an authentication provider for Discourse. |
| 🛠 | **Repository Link** | [https://github.com/discourse/discourse-openid-connect](https://github.com/discourse/discourse-openid-connect) |
| 📖 | **Install Guide** | [How to install plugins in Discourse](https://meta.discourse.org/t/install-plugins-in-discourse/19157) |

Editing and saving the table (without changing data) with the table builder duplicates every row that doesn’t have a leading pipe:

> **If headers miss a leading pipe, editing and saving duplicates the header:**
>

  

> **If headers and the separator miss a leading pipe, it duplicates the header and the separator:**
>

  

> **If all rows but the header miss a leading pipe, editing and saving duplicates everything but the header**
>
> [gmumsb.cloudfront.net/original/4X/8/6/9/8698915fc6b623d8f1d4495694845016fcace410.mp4](http://gmumsb.cloudfront.net/original/4X/8/6/9/8698915fc6b623d8f1d4495694845016fcace410.mp4)

If every row miss a leading pipe, saving the table doesn’t work and generates a JS error:  
`Cannot read properties of null (reading 'length')`.

The default table from the topic template in #Customization > Plugin didn’t use leading pipes, so I modified it to add the pipes and prevent potential errors.

* * *

To sum it up:

1. table rows without leading pipes are valid markdown syntax

2. table builder doesn’t like table rows without leading pipes

😺
