fix: resolve all 6 prefer-const eslint errors for CI
This commit is contained in:
@@ -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