Use table header for triggering markdown detection
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user