Use table header for triggering markdown detection

This commit is contained in:
Tom Moor
2023-12-09 13:29:49 -05:00
parent 84ef72d846
commit f9c3b0e193

View File

@@ -24,5 +24,11 @@ export default function isMarkdown(text: string): boolean {
return true;
}
// table header-ish
const tables = text.match(/^\|\s?[-]+\s?\|/gm);
if (tables && tables.length > 1) {
return true;
}
return false;
}