From bc0c743a0165f1a97e2197e9bd0bc665198e464a Mon Sep 17 00:00:00 2001 From: FelisDiligens <47528453+FelisDiligens@users.noreply.github.com> Date: Sat, 15 Jul 2023 11:57:45 +0200 Subject: [PATCH] Fix wrong auto-detect, see #4 --- src/tableUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tableUtils.ts b/src/tableUtils.ts index 238f46b..5cd34d3 100644 --- a/src/tableUtils.ts +++ b/src/tableUtils.ts @@ -71,7 +71,7 @@ export function parseTable(table: string, format: string): Table { if (table.match(/<\s*[tT][aA][bB][lL][eE].*\s*>/) && table.match(/<\/\s*[tT][aA][bB][lL][eE]\s*>/)) return htmlParser.parse(table); // Markdown separator row found? - else if (table.match(separatorRegex)) + else if (table.match(/^\|?([\s\.]*:?[\-=\.]+[:\+]?[\s\.]*\|?)+\|?$/m)) return getMarkdownParser(format).parse(table); // At least one comma found? else if (table.match(/(.*,)+.*/))