diff --git a/package.json b/package.json index a63fe0f..35fcf3f 100644 --- a/package.json +++ b/package.json @@ -32,5 +32,10 @@ "typescript": "5.7.2", "zod": "^3.24.1" }, - "packageManager": "pnpm@9.15.1+sha256.9e534e70afef06374f6126b44bda5760947135ce16a30aef1010e965fb7e3e3e" + "packageManager": "pnpm@9.15.1+sha256.9e534e70afef06374f6126b44bda5760947135ce16a30aef1010e965fb7e3e3e", + "pnpm": { + "patchedDependencies": { + "@portaljs/remark-wiki-link": "patches/@portaljs__remark-wiki-link.patch" + } + } } diff --git a/patches/@portaljs__remark-wiki-link.patch b/patches/@portaljs__remark-wiki-link.patch new file mode 100644 index 0000000..8583d0a --- /dev/null +++ b/patches/@portaljs__remark-wiki-link.patch @@ -0,0 +1,36 @@ +diff --git a/dist/index.cjs b/dist/index.cjs +index 80d21bbf699310538dbb0a5c1b063b0716706fc4..53f8dab5fc21920fe90891260c672902f91573c8 100644 +--- a/dist/index.cjs ++++ b/dist/index.cjs +@@ -366,11 +366,12 @@ function fromMarkdown() { + current.data.alias = alias; + } + function exitWikiLink(token) { +- var wikiLink = this.exit(token); ++ var wikiLink = top(this.stack); + var _wikiLink$data = wikiLink.data, + isEmbed = _wikiLink$data.isEmbed, + target = _wikiLink$data.target, + alias = _wikiLink$data.alias; ++ this.exit(token); + // eslint-disable-next-line no-useless-escape + var wikiLinkWithHeadingPattern = /^((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)(#(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/; + var _target$match = target.match(wikiLinkWithHeadingPattern), +diff --git a/dist/index.js b/dist/index.js +index 8cee892269bb0768d9be4f3f6407a59e3b56af40..680381cfac8489242cafb577f2044507004398fb 100644 +--- a/dist/index.js ++++ b/dist/index.js +@@ -357,11 +357,12 @@ function fromMarkdown() { + current.data.alias = alias; + } + function exitWikiLink(token) { +- var wikiLink = this.exit(token); ++ var wikiLink = top(this.stack); + var _wikiLink$data = wikiLink.data, + isEmbed = _wikiLink$data.isEmbed, + target = _wikiLink$data.target, + alias = _wikiLink$data.alias; ++ this.exit(token); + // eslint-disable-next-line no-useless-escape + var wikiLinkWithHeadingPattern = /^((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)(#(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/; + var _target$match = target.match(wikiLinkWithHeadingPattern), diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 76a4f54..ee34003 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,11 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +patchedDependencies: + '@portaljs/remark-wiki-link': + hash: psmwlfrcxicrcmzelw3cbakfve + path: patches/@portaljs__remark-wiki-link.patch + importers: .: @@ -16,7 +21,7 @@ importers: version: 1.9.4 '@portaljs/remark-wiki-link': specifier: ^1.2.0 - version: 1.2.0 + version: 1.2.0(patch_hash=psmwlfrcxicrcmzelw3cbakfve) '@t3-oss/env-nextjs': specifier: ^0.11.1 version: 0.11.1(typescript@5.7.2)(zod@3.24.1) @@ -2268,7 +2273,7 @@ snapshots: '@next/swc-win32-x64-msvc@15.1.2': optional: true - '@portaljs/remark-wiki-link@1.2.0': + '@portaljs/remark-wiki-link@1.2.0(patch_hash=psmwlfrcxicrcmzelw3cbakfve)': dependencies: mdast-util-to-markdown: 1.5.0 mdast-util-wiki-link: 0.0.2 diff --git a/utils/blog.ts b/utils/blog.ts index a032091..1da2bfe 100644 --- a/utils/blog.ts +++ b/utils/blog.ts @@ -84,7 +84,7 @@ export const fetchBlogPosts = cache(async () => { ).then((results) => results.flatMap((res) => { if (res.status === 'fulfilled') return [res.value] - console.warn(res.reason) + // console.warn(res.reason) return [] }), )