Skip to content

Don't reflow dashed lists, same as asterisk lists - #87

Draft
hugovk wants to merge 1 commit into
python:mainfrom
hugovk:fix-dash-list
Draft

Don't reflow dashed lists, same as asterisk lists#87
hugovk wants to merge 1 commit into
python:mainfrom
hugovk:fix-dash-list

Conversation

@hugovk

@hugovk hugovk commented Aug 27, 2026

Copy link
Copy Markdown
Member

Fixes #11.

We already handled lists using *, but not using -.

Comment thread src/blurb/_utils/text.py
for paragraph in paragraphs:
# don't reflow bulleted / numbered lists
dont_reflow = dont_reflow or paragraph.startswith(('* ', '1. ', '#. '))
dont_reflow = dont_reflow or paragraph.startswith(('* ', '- ', '1. ', '#. '))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this break the generated NEWS, which prepends - to each entry?

blurb/src/blurb/_merge.py

Lines 107 to 108 in ed0ea0c

body = f'- {body}'
text = textwrap_body(body, subsequent_indent=' ')

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it will. This can wait, let's not hold up #88 for this.

@hugovk
hugovk marked this pull request as draft August 27, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve indentation in multi-line list entry

2 participants