chore(deps): update markdown-it to v15 for quadratic-complexity fixes

v15.0.1 fixes quadratic-complexity bugs in the linkify inline rule and
fuzzy-link replacement - relevant here since this app renders notes
with linkify: true. Also drops @types/markdown-it, which v15 makes
redundant by bundling its own TypeScript declarations (conflicting
otherwise), and adapts two call sites to the now-more-precise
attrGet() return type (string | number | null vs the community types'
string | null).
This commit is contained in:
Frederic Cabassut
2026-09-02 09:34:03 +02:00
committed by Fred Cabassut
parent 44963bf684
commit 12ff6d9c4d
3 changed files with 35 additions and 9 deletions
+1 -2
View File
@@ -55,7 +55,7 @@
"drizzle-orm": "^0.45.2",
"idb": "^8.0.3",
"lucide-svelte": "^0.577.0",
"markdown-it": "^14.3.1",
"markdown-it": "^15.0.1",
"nanoid": "^5.1.16",
"node-diff3": "^3.2.1",
"nodemailer": "^9.1.0",
@@ -73,7 +73,6 @@
"@tailwindcss/typography": "^0.5.20",
"@tailwindcss/vite": "^4.3.3",
"@types/better-sqlite3": "^7.6.13",
"@types/markdown-it": "^14.2.0",
"@types/nodemailer": "^8.0.1",
"@types/sanitize-html": "^2.16.1",
"@types/uuid": "^10.0.0",
+32 -5
View File
@@ -82,8 +82,8 @@ importers:
specifier: ^0.577.0
version: 0.577.0(svelte@5.57.0)
markdown-it:
specifier: ^14.3.1
version: 14.3.1
specifier: ^15.0.1
version: 15.0.1
nanoid:
specifier: ^5.1.16
version: 5.1.16
@@ -130,9 +130,6 @@ importers:
'@types/better-sqlite3':
specifier: ^7.6.13
version: 7.6.13
'@types/markdown-it':
specifier: ^14.2.0
version: 14.2.0
'@types/nodemailer':
specifier: ^8.0.1
version: 8.0.1
@@ -1887,6 +1884,9 @@ packages:
argparse@2.0.1:
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
argparse@3.0.1:
resolution: {integrity: sha512-nM4mHF/KM1v59ZNKX7zfusQz5wUAxR511YG8Vo6TyiV4aqhu++rbJW4v04xsWhpSsHFj66flT8P7znVpyO20xQ==}
aria-query@5.3.1:
resolution: {integrity: sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g==}
engines: {node: '>= 0.4'}
@@ -3046,6 +3046,9 @@ packages:
linkify-it@5.0.2:
resolution: {integrity: sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==}
linkify-it@6.1.0:
resolution: {integrity: sha512-wJ/TwpSDTLepCrQoYWYIExIKg5Zchex2Nn5yk2mFnB+6PtdkHtyLx742md9csRjjOnGkKIS/RrbY7l8D6gT9Vw==}
linkifyjs@4.3.3:
resolution: {integrity: sha512-P8aEP5U/D1/IlTY2OeYsErdwh9bGuLE30NcXtKEjgdHcahveQoQwM2yZNsioQHsWFz0P7KKudisbrzCgR0sDHg==}
@@ -3108,6 +3111,10 @@ packages:
resolution: {integrity: sha512-4Ej49aYTDFIQ+uBkfX8GBvJGccoARxxPep+7aWTs55ozbjQJpW9M26Fe53vnGgvLeVzva/amzjQQaQu9w0vMhA==}
hasBin: true
markdown-it@15.0.1:
resolution: {integrity: sha512-9/7gE95FNPkfUWrjJIoHZza2iLmuJlPD0UNMxPi7bxUrbCR525YZY0r+zyfes0dZI5ZZ/uNIXUJca0pJvtw41g==}
hasBin: true
math-intrinsics@1.1.0:
resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
engines: {node: '>= 0.4'}
@@ -3910,6 +3917,9 @@ packages:
uc.micro@2.1.0:
resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
uc.micro@3.0.0:
resolution: {integrity: sha512-U3PppEkleoTnIfi8BozMx3yju3qc/L6SwqWo2Sw+54PX+PX0q9I+r1Um5HCmqD7n9VDX5/v3vQH/AjA6deDdtw==}
unbox-primitive@1.1.0:
resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==}
engines: {node: '>= 0.4'}
@@ -5897,6 +5907,8 @@ snapshots:
argparse@2.0.1: {}
argparse@3.0.1: {}
aria-query@5.3.1: {}
array-buffer-byte-length@1.0.2:
@@ -7089,6 +7101,10 @@ snapshots:
dependencies:
uc.micro: 2.1.0
linkify-it@6.1.0:
dependencies:
uc.micro: 3.0.0
linkifyjs@4.3.3: {}
locate-character@3.0.0: {}
@@ -7150,6 +7166,15 @@ snapshots:
punycode.js: 2.3.1
uc.micro: 2.1.0
markdown-it@15.0.1:
dependencies:
argparse: 3.0.1
entities: 8.0.0
linkify-it: 6.1.0
mdurl: 2.1.0
punycode.js: 2.3.1
uc.micro: 3.0.0
math-intrinsics@1.1.0: {}
mdn-data@2.27.1: {}
@@ -8101,6 +8126,8 @@ snapshots:
uc.micro@2.1.0: {}
uc.micro@3.0.0: {}
unbox-primitive@1.1.0:
dependencies:
call-bound: 1.0.4
+2 -2
View File
@@ -48,7 +48,7 @@ md.core.ruler.after('inline', 'task-lists', (state) => {
// Add task-list class to parent <ul> (once)
for (let j = i - 1; j >= 0; j--) {
if (tokens[j].type === 'bullet_list_open') {
const cls = tokens[j].attrGet('class') ?? '';
const cls = String(tokens[j].attrGet('class') ?? '');
if (!cls.includes('task-list')) {
tokens[j].attrJoin('class', 'task-list');
}
@@ -66,7 +66,7 @@ md.core.ruler.after('task-lists', 'note-links', (state) => {
const children = token.children;
for (let i = 0; i < children.length; i++) {
if (children[i].type !== 'link_open') continue;
const href = children[i].attrGet('href') ?? '';
const href = String(children[i].attrGet('href') ?? '');
if (!href.startsWith('crumb-note://')) continue;
let closeIndex = i + 1;