From 83271a3db55b47684ab6d7a730fd00a57ac6a714 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Nov 2025 10:05:29 +0000 Subject: [PATCH 1/2] Bump turndown from 7.2.1 to 7.2.2 in the npm-production group Bumps the npm-production group with 1 update: [turndown](https://github.com/mixmark-io/turndown). Updates `turndown` from 7.2.1 to 7.2.2 - [Release notes](https://github.com/mixmark-io/turndown/releases) - [Commits](https://github.com/mixmark-io/turndown/compare/v7.2.1...v7.2.2) --- updated-dependencies: - dependency-name: turndown dependency-version: 7.2.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: npm-production ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index c01447c..2dce454 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@actions/core": "^1.11.1", "node-html-parser": "^7.0.1", "simple-git": "^3.28.0", - "turndown": "^7.2.1", + "turndown": "^7.2.2", "turndown-plugin-gfm": "^1.0.2" }, "devDependencies": { @@ -10823,9 +10823,9 @@ } }, "node_modules/turndown": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/turndown/-/turndown-7.2.1.tgz", - "integrity": "sha512-7YiPJw6rLClQL3oUKN3KgMaXeJJ2lAyZItclgKDurqnH61so4k4IH/qwmMva0zpuJc/FhRExBBnk7EbeFANlgQ==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/turndown/-/turndown-7.2.2.tgz", + "integrity": "sha512-1F7db8BiExOKxjSMU2b7if62D/XOyQyZbPKq/nUwopfgnHlqXHqQ0lvfUTeUIr1lZJzOPFn43dODyMSIfvWRKQ==", "license": "MIT", "dependencies": { "@mixmark-io/domino": "^2.2.0" diff --git a/package.json b/package.json index 566cb91..8d72001 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "@actions/core": "^1.11.1", "node-html-parser": "^7.0.1", "simple-git": "^3.28.0", - "turndown": "^7.2.1", + "turndown": "^7.2.2", "turndown-plugin-gfm": "^1.0.2" }, "devDependencies": { From 7839fd0df8121d25a84b6e04e9818339508ceff4 Mon Sep 17 00:00:00 2001 From: AnHeuermann <38031952+AnHeuermann@users.noreply.github.com> Date: Wed, 12 Nov 2025 17:37:24 +0100 Subject: [PATCH 2/2] Updating dist --- dist/index.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/dist/index.js b/dist/index.js index b6e34fd..0759d9b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -81470,6 +81470,10 @@ function trimTrailingNewlines (string) { return string.substring(0, indexEnd) } +function trimNewlines (string) { + return trimTrailingNewlines(trimLeadingNewlines(string)) +} + var blockElements = [ 'ADDRESS', 'ARTICLE', 'ASIDE', 'AUDIO', 'BLOCKQUOTE', 'BODY', 'CANVAS', 'CENTER', 'DD', 'DIR', 'DIV', 'DL', 'DT', 'FIELDSET', 'FIGCAPTION', 'FIGURE', @@ -81561,8 +81565,7 @@ rules.blockquote = { filter: 'blockquote', replacement: function (content) { - content = content.replace(/^\n+|\n+$/g, ''); - content = content.replace(/^/gm, '> '); + content = trimNewlines(content).replace(/^/gm, '> '); return '\n\n' + content + '\n\n' } }; @@ -81591,12 +81594,11 @@ rules.listItem = { var index = Array.prototype.indexOf.call(parent.children, node); prefix = (start ? Number(start) + index : index + 1) + '. '; } - content = content - .replace(/^\n+/, '') // remove leading newlines - .replace(/\n+$/, '\n') // replace trailing newlines with just a single one - .replace(/\n/gm, '\n' + ' '.repeat(prefix.length)); // indent + var isParagraph = /\n$/.test(content); + content = trimNewlines(content) + (isParagraph ? '\n' : ''); + content = content.replace(/\n/gm, '\n' + ' '.repeat(prefix.length)); // indent return ( - prefix + content + (node.nextSibling && !/\n$/.test(content) ? '\n' : '') + prefix + content + (node.nextSibling ? '\n' : '') ) } };