Skip to content

Conversation

@kzu
Copy link
Member

@kzu kzu commented Jul 21, 2025

This allows having newlines in the csproj while still compacting for packing.

The trimming involves:

  • Removing blank lines at the beginning and ending of the value
  • Determining indenting on the first line and using that to remove subsequent indenting in all following lines.
  • Applying markdown rules to remove newlines: meaning only full paragraph separating newlines (blank) will be kept.
  • Collapse multiple blank newlines into just one (when separating paragraphs).

This means you can indent nicely in the XML (as VS does by default) while still keeping a clean and compact representation in the package. For example:

    <Description>
      Create, edit and run multiple C# top-level programs in the same project,
      respecting per-file `#:package` references and `#:property` 😍
    </Description>

Would become a single line of text.

@kzu kzu added the enhancement New feature or request label Jul 21, 2025
@kzu kzu force-pushed the dev/trimtext branch 2 times, most recently from 5d1c409 to 6cfe7eb Compare July 21, 2025 21:56
@kzu
Copy link
Member Author

kzu commented Jul 21, 2025

296 passed 296 passed 1 skipped

🧪 Details on Microsoft Windows 10.0.20348

from dotnet-retest v0.7.1 on .NET 8.0.18 with 💜 by @devlooped

@kzu kzu force-pushed the dev/trimtext branch 2 times, most recently from c307578 to 32fe5df Compare July 21, 2025 22:10
@kzu kzu enabled auto-merge (rebase) July 21, 2025 22:12
This allows having newlines in the csproj while still compacting for packing.

The trimming involves:
* Removing blank lines at the beginning and ending of the value
* Determining indenting on the first line and using that to remove subsequent indenting in all following lines.
* Applying markdown rules to remove newlines: meaning only full paragraph separating newlines (blank) will be kept.
* Collapse multiple blank newlines into just one (when separating paragraphs).

This means you can indent nicely in the XML (as VS does by default) while still keeping a clean and compact representation in the package. For example:

```xml
    <Description>
      Create, edit and run multiple C# top-level programs in the same project,
      respecting per-file `#:package` references and `#:property` 😍
    </Description>
```
Would become a single line of text.
@kzu kzu merged commit b453e08 into main Jul 21, 2025
6 checks passed
@kzu kzu deleted the dev/trimtext branch July 21, 2025 23:47
@devlooped devlooped locked and limited conversation to collaborators Aug 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants