From 70e9ff2fd74cae75a7cfadd66d8ca967d0fec67d Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Tue, 13 May 2025 10:27:42 -0700 Subject: [PATCH] fix: patch in #366 and #367 for marked-terminal --- package.json | 9 +++++++++ patches/marked-terminal@7.3.0.patch | 26 ++++++++++++++++++++++++++ pnpm-lock.yaml | 9 +++++++-- pnpm-workspace.yaml | 3 +++ 4 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 patches/marked-terminal@7.3.0.patch diff --git a/package.json b/package.json index 7bdb5f3e6c..4f97d3a37c 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,15 @@ "overrides": { "punycode": "^2.3.1" }, + "pnpm": { + "patchedDependencies": { + "marked-terminal@7.3.0": "patches/marked-terminal@7.3.0.patch" + } + }, + "files": [ + "bin", + "dist" + ], "engines": { "node": ">=22", "pnpm": ">=9.0.0" diff --git a/patches/marked-terminal@7.3.0.patch b/patches/marked-terminal@7.3.0.patch new file mode 100644 index 0000000000..c08b9a7e55 --- /dev/null +++ b/patches/marked-terminal@7.3.0.patch @@ -0,0 +1,26 @@ +diff --git a/index.cjs b/index.cjs +index 1afa52b2b7162a948e1d044babf3d456ff7feec7..27e632aa643fa77fc9f294782904be7d9991c13a 100644 +--- a/index.cjs ++++ b/index.cjs +@@ -59430,7 +59430,7 @@ Renderer.prototype.space = function () { + + Renderer.prototype.text = function (text) { + if (typeof text === 'object') { +- text = text.text; ++ text = text.tokens ? this.parser.parseInline(text.tokens) : text.text; + } + return this.o.text(text); + }; +@@ -59532,10 +59532,10 @@ Renderer.prototype.listitem = function (text) { + } + var transform = compose(this.o.listitem, this.transform); + var isNested = text.indexOf('\n') !== -1; +- if (isNested) text = text.trim(); ++ if (!isNested) text = transform(text); + + // Use BULLET_POINT as a marker for ordered or unordered list item +- return '\n' + BULLET_POINT + transform(text); ++ return '\n' + BULLET_POINT + text; + }; + + Renderer.prototype.checkbox = function (checked) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a0efcba738..dad2475ca0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,6 +9,11 @@ overrides: micromatch: ^4.0.8 semver: ^7.7.1 +patchedDependencies: + marked-terminal@7.3.0: + hash: b5a123772349b9cee9201d486a95ced91002bbfab64972dd67399453154bbc8d + path: patches/marked-terminal@7.3.0.patch + importers: .: @@ -66,7 +71,7 @@ importers: version: 15.0.8 marked-terminal: specifier: ^7.3.0 - version: 7.3.0(marked@15.0.8) + version: 7.3.0(patch_hash=b5a123772349b9cee9201d486a95ced91002bbfab64972dd67399453154bbc8d)(marked@15.0.8) meow: specifier: ^13.2.0 version: 13.2.0 @@ -4105,7 +4110,7 @@ snapshots: make-error@1.3.6: {} - marked-terminal@7.3.0(marked@15.0.8): + marked-terminal@7.3.0(patch_hash=b5a123772349b9cee9201d486a95ced91002bbfab64972dd67399453154bbc8d)(marked@15.0.8): dependencies: ansi-escapes: 7.0.0 ansi-regex: 6.1.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index d3ac856082..edb77fe235 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -5,3 +5,6 @@ packages: ignoredBuiltDependencies: - esbuild + +patchedDependencies: + marked-terminal@7.3.0: patches/marked-terminal@7.3.0.patch