Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

### Added

- Added formatting for multiline string interior whitespace. Enabled by default with new setting `format_multiline_strings`.
1. Indentation is normalised to align the trailing quote with the leading quote. Lines in the
middle are adjusted to retain their original significant leading whitespace.
2. Internal line endings are normalised to match the configured line ending.
3. Invalid multiline strings are left untouched.

## [0.6.0] - 2025-08-25

### Fixed
Expand Down
24 changes: 24 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Added

- Added setting to enable internal formatting of multiline strings: `OptimisingLineFormatterSettings.format_multiline_strings`.

### Changed

- In order to support mutation of token contents, a few APIs have been adjusted.
Comment thread
jgardn3r marked this conversation as resolved.
1. `Token::set_content` was added.
2. `FormattedTokens`
* Methods `new_from_tokens`, `new`, and `get_token` were adjusted to either expect exclusive
references to tokens as arguments, or return exclusive references to tokens as part of the
result.
* Method `get_tokens` was deleted and replaced by `tokens`, which returns an iterator instead
of a reference to a vector.
* Method `get_token_mut` was added to provide a way to safely retrieve mutatable references to
tokens (alongside the mutable formatting data), protecting against mutating ignored tokens.
* Method `tokens_mut` was added to provide an iterable equivalent to `get_token_mut`,
mirroring the relationship between `get_token` and `tokens`.

### Removed

- `FormattedTokens::new` was removed from the public API, because it was intended only for internal
testing use.

## 0.6.0 - 2025-08-25

### Fixed
Expand Down
Loading
Loading