Skip to content

Commit

Permalink
Fix wrong auto-detect, see #4
Browse files Browse the repository at this point in the history
  • Loading branch information
FelisDiligens committed Jul 15, 2023
1 parent bac23e5 commit bc0c743
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tableUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(/(.*,)+.*/))
Expand Down

0 comments on commit bc0c743

Please sign in to comment.