Skip to content

Commit cb6e971

Browse files
build(release): 3.2.5 [skip ci]
## [3.2.5](v3.2.4...v3.2.5) (2026-04-22) ### Bug Fixes * improve body parsing logic ([#72](#72)) ([cf55537](cf55537))
1 parent cf55537 commit cb6e971

2 files changed

Lines changed: 30 additions & 4 deletions

File tree

dist/index.js

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35006,9 +35006,35 @@ async function run(env, body, fs, core) {
3500635006
return result
3500735007
}
3500835008

35009-
result = body
35010-
.trim()
35011-
.split("###")
35009+
function parseBody(body) {
35010+
let result = [];
35011+
let ignore = false;
35012+
35013+
body.split("\n").reduce((str, line, idx, arr) => {
35014+
// ``` Section must be ignored and not parsed as new section
35015+
if (line.startsWith("```"))
35016+
ignore = !ignore
35017+
35018+
// Parse new setion only if they start with ### SPACE
35019+
if (!ignore && line.startsWith("### ")) {
35020+
result.push(str.trim())
35021+
35022+
return line.replace(/^### /, "")+"\n";
35023+
}
35024+
35025+
str += line + "\n"
35026+
35027+
// Push the last string if we are at the end of lines
35028+
if (arr.length - 1 == idx)
35029+
result.push(str.trim())
35030+
35031+
return str;
35032+
}, "")
35033+
35034+
return result;
35035+
}
35036+
35037+
result = parseBody(body)
3501235038
.filter(Boolean)
3501335039
.map((line) => {
3501435040
return line

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "github-issue-parser",
33
"private": true,
4-
"version": "3.2.4",
4+
"version": "3.2.5",
55
"description": "",
66
"main": "index.js",
77
"type": "module",

0 commit comments

Comments
 (0)