Skip to content

Commit 7e65f6e

Browse files
committed
Fix bugs in publish/collect.mjs
1 parent f8b77f0 commit 7e65f6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

publish/collect.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ for (const [name, path] of Object.entries(parts)) {
2626
}
2727

2828
parts.abnf = "## message.abnf\n\n```abnf\n" + parts.abnf + "\n```";
29-
parts.json = "## message.json\n\n```json\n" + parts.json + "\n```";
29+
parts.json = "### message.json\n\n```json\n" + parts.json + "\n```";
3030

3131
// Strip title + table of contents
3232
const introStart = parts.intro.indexOf("## Introduction");
@@ -40,7 +40,7 @@ parts.functions = parts.functions.replace(
4040

4141
const result = Object.values(parts)
4242
.join("\n\n")
43-
.replace(/ +$/g, "")
43+
.replace(/ +$/gm, "")
4444
.replace(/\n{3,}/g, "\n\n")
4545
.replace(/\[(.+?)\]\((.+?)\)/g, fixLink);
4646
console.log(result);

0 commit comments

Comments
 (0)