fix: resolve all 6 prefer-const eslint errors for CI
This commit is contained in:
@@ -19,7 +19,7 @@ toolRegistry.register({
|
||||
}),
|
||||
execute: async ({ notebookId, noteIds, locale }) => {
|
||||
try {
|
||||
let where: any = { userId: ctx.userId, trashedAt: null }
|
||||
const where: any = { userId: ctx.userId, trashedAt: null }
|
||||
if (noteIds && noteIds.length > 0) {
|
||||
where.id = { in: noteIds }
|
||||
} else if (notebookId) {
|
||||
|
||||
@@ -8,7 +8,7 @@ const HTML_IMG = /<img[^>]+src=["']([^"']+)["'][^>]*>/gi
|
||||
*/
|
||||
export function stripMarkdownPreview(raw: string, maxLen = 180): string {
|
||||
if (!raw?.trim()) return ''
|
||||
let t = raw
|
||||
const t = raw
|
||||
.replace(/^#{1,6}\s+/gm, '')
|
||||
.replace(/```[\s\S]*?```/g, ' ')
|
||||
.replace(/\*\*([^*]+)\*\*/g, '$1')
|
||||
|
||||
Reference in New Issue
Block a user