mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-22 02:56:52 +03:00
Strip leading whitespace in release-notes markdown extraction
The HTML changelog source lives 12 spaces deep inside its containers, so list items emitted by htmlToMarkdown carried that indentation. Four or more leading spaces in markdown is a code block, so all bullets after the first (which the final .trim() rescued) rendered as code on the GitHub release page. Strip leading whitespace per line. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
bf2bc55aa1
commit
27af49f190
@@ -210,6 +210,7 @@ function htmlToMarkdown(html) {
|
||||
md = md.replace(/>/g, '>');
|
||||
md = md.replace(/"/g, '"');
|
||||
md = md.replace(/'/g, "'");
|
||||
md = md.replace(/^[ \t]+/gm, '');
|
||||
md = md.replace(/[ \t]+\n/g, '\n');
|
||||
md = md.replace(/\n{3,}/g, '\n\n');
|
||||
return md.trim();
|
||||
|
||||
Reference in New Issue
Block a user