Skip to content

Reset the pending indent in IndentedStringBuilder.Clear - #39795

Open
ilkertskn wants to merge 1 commit into
dotnet:mainfrom
ilkertskn:fix/indented-string-builder-clear-pending-indent
Open

ilkertskn wants to merge 1 commit into
dotnet:mainfrom
ilkertskn:fix/indented-string-builder-clear-pending-indent

Conversation

@ilkertskn

Copy link
Copy Markdown
Contributor

Clear resets the builder to build a new string, but it left the pending-indent flag as it was. When the cleared content didn't end with a new line, the first line appended afterwards was not indented.

  • [x ] I've read the guidelines for contributing and seen the walkthrough
  • [ x] I've posted a comment on an issue with a detailed description of how I am planning to contribute and got approval from a member of the team
  • [x ] The code builds and tests pass locally (also verified by our automated build checks)
  • [x ] Commit messages follow this format:
        Summary of the changes
        - Detail 1
        - Detail 2

        Fixes #bugnumber
  • [x ] Tests for the changes have been added (for bug fixes / features)
  • [x ] Code follows the same patterns and style as existing code in this repo

Clear resets the builder to build a new string, but it left the pending-indent
flag as it was. When the cleared content didn't end with a new line, the first
line appended afterwards was not indented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant