chore: add new lint rules

This commit is contained in:
Gusted 2024-10-23 08:10:18 +02:00
parent 1ec3e638a5
commit f63f02045e
No known key found for this signature in database
GPG key ID: FD821B732837125F
5 changed files with 8 additions and 5 deletions

View file

@ -363,7 +363,7 @@ class ComboMarkdownEditor {
const lineStart = Math.max(0, value.lastIndexOf('\n', start - 1) + 1);
// Find the end and extract the line.
const lineEnd = value.indexOf('\n', start);
const line = value.slice(lineStart, lineEnd < 0 ? value.length : lineEnd);
const line = value.slice(lineStart, lineEnd === -1 ? value.length : lineEnd);
// Match any whitespace at the start + any repeatable prefix + exactly one space after.
const prefix = line.match(/^\s*((\d+)[.)]\s|[-*+]\s+(\[[ x]\]\s?)?|(>\s+)+)?/);