Skip to content

prefix every line of a multiline comment in Item.comment and add_line#544

Open
netliomax25-code wants to merge 1 commit into
python-poetry:masterfrom
netliomax25-code:multiline-comment-prefix
Open

prefix every line of a multiline comment in Item.comment and add_line#544
netliomax25-code wants to merge 1 commit into
python-poetry:masterfrom
netliomax25-code:multiline-comment-prefix

Conversation

@netliomax25-code

Copy link
Copy Markdown
Contributor

Summary

  1. Item.comment() and Array.add_line(comment=...) prepend a single # to the whole comment string, so the second line onward of a comment with an embedded newline renders without a #.
  2. That output no longer re-parses: the bare continuation line is read as a stray key/token, so tomlkit raises a parse error and tomllib rejects it too.
  3. Prefix every line of a multiline comment with # #511 fixed this for the comment() factory but left these two public-API siblings. Both now go through one helper that prefixes every line, matching that fix. Single-line comments are unchanged.

Agent Drafting Metadata

  • Agent:
  • Model:
  • Notes:

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.

1 participant