From 688f39447ced09e7ba67f4f428eaaf2610c5fc5f Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Tue, 26 Dec 2017 15:52:22 +0530 Subject: [PATCH] Skip tab delimited lists in plain text to table conversion --- app/assets/javascripts/discourse/components/d-editor.js.es6 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/components/d-editor.js.es6 b/app/assets/javascripts/discourse/components/d-editor.js.es6 index 7b255638578..3d357ec2255 100644 --- a/app/assets/javascripts/discourse/components/d-editor.js.es6 +++ b/app/assets/javascripts/discourse/components/d-editor.js.es6 @@ -633,7 +633,8 @@ export default Ember.Component.extend({ if (rows.length > 1) { const columns = rows.map(r => r.split("\t").length); - const isTable = columns.reduce((a, b) => a && columns[0] === b && b > 1); + const isTable = columns.reduce((a, b) => a && columns[0] === b && b > 1) && + !(columns[0] === 2 && rows[0].split("\t")[0].match(/^•$|^\d+.$/)); // to skip tab delimited lists if (isTable) { const splitterRow = [...Array(columns[0])].map(() => "---").join("\t");