From 7e65777187ace26214915ff0bacb8abd0623d409 Mon Sep 17 00:00:00 2001 From: Keegan George Date: Thu, 13 Oct 2022 14:37:01 -0700 Subject: [PATCH] FIX: Misalignment of table after edit (#30) See Meta bug report: https://meta.discourse.org/t/table-builder/236016/54 --- javascripts/discourse/components/spreadsheet-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascripts/discourse/components/spreadsheet-editor.js b/javascripts/discourse/components/spreadsheet-editor.js index 326917c..5a6e7b0 100644 --- a/javascripts/discourse/components/spreadsheet-editor.js +++ b/javascripts/discourse/components/spreadsheet-editor.js @@ -200,7 +200,7 @@ export default class SpreadsheetEditor extends Component { if (tableToEdit.length > 1) { editedTable = raw.replace(tableToEdit[tableId], newRaw); } else { - editedTable = raw.replace(findTableRegex(), newRaw); + editedTable = raw.replace(tableToEdit[0], newRaw); } // replace null characters