fix(submit): unwrap hard-wrapped list items in PR descriptions (#43) · boneskull/gh-stack@60366b2 · GitHub
Skip to content

Commit 60366b2

Browse files
authored
fix(submit): unwrap hard-wrapped list items in PR descriptions (#43)
* fix(submit): unwrap hard-wrapped list items in PR descriptions List items that were hard-wrapped at ~72 columns in commit messages would produce broken markdown in generated PR descriptions—the continuation line became an orphan paragraph between list items. - Add `isListItem()` to detect list markers (including nested/indented) - Treat list items as accumulation groups (like paragraphs) so continuations are joined back into the item - Check list continuations before the 4-space indent rule so nested list continuations (2 nesting + 2 continuation = 4 spaces) aren't misidentified as indented code blocks * fix(submit): clarify comment about non-list block element check Explain why `isBlockElement` is reached only for non-list elements: lists are detected and accumulated earlier via `isListItem`.
1 parent 74fc779 commit 60366b2

2 files changed

Lines changed: 114 additions & 10 deletions

File tree

‎cmd/submit.go‎

Lines changed: 56 additions & 6 deletions

‎cmd/submit_internal_test.go‎

Lines changed: 58 additions & 4 deletions

0 commit comments

Comments
 (0)