mirror of
https://github.com/outline/outline.git
synced 2026-11-22 05:51:43 +03:00
fix: Remove numbered list detection for markdown, closes #8523
This commit is contained in:
1 parent
87fcf35956
commit
2e3c19ff88
2 files changed
+1
-12
No files matched your search
@@ -16,17 +16,6 @@ test("returns true for bullet list", () => {
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
test("returns true for numbered list", () => {
|
||||
expect(
|
||||
isMarkdown(`1. item one
|
||||
1. item two`)
|
||||
).toBe(true);
|
||||
expect(
|
||||
isMarkdown(`1. item one
|
||||
2. item two`)
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
test("returns true for code fence", () => {
|
||||
expect(
|
||||
isMarkdown(`\`\`\`javascript
|
||||
|
||||
@@ -33,7 +33,7 @@ export default function isMarkdown(text: string): boolean {
|
||||
}
|
||||
|
||||
// list-ish
|
||||
const listItems = text.match(/^([-*]|\d+.)\s\S+/gm);
|
||||
const listItems = text.match(/^[-*]\s\S+/gm);
|
||||
if (listItems) {
|
||||
signals += listItems.length;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user