Skip to content

Conversation

@sethmlarson
Copy link
Contributor

@sethmlarson sethmlarson commented Jan 16, 2026

- No forced space to indent,
- use almost the same code as the `bare-quoted-string`
block above, handle nested comments and escaped parenthesis
in addition
e.g. with a 40 characters length policy, the below
`((loremipsum)(loremipsum)(loremipsum)(loremipsum))<spy@example.org>`

should not be folded to
`((loremipsum)(loremipsum)(loremipsum)\n(loremipsum))<spy@example.org>`

but should rather stay
`((loremipsum)(loremipsum)(loremipsum)(loremipsum))<spy@example.org>`

to prevent to add a new line not starting with a space / with no
indentation
To test a whitespace between two nested comments leads to a
new line with one space indentation on folding
@sethmlarson sethmlarson force-pushed the email-preserve-parens-when-folding-comments branch from 3a9b2c7 to 8ad0fdb Compare January 16, 2026 20:45
@sethmlarson sethmlarson added type-security A security issue stdlib Standard Library Python modules in the Lib/ directory topic-email labels Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review stdlib Standard Library Python modules in the Lib/ directory topic-email type-security A security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants