diffplug / diffplug/spotless

indent step not playing nicely with multiline string literals

Open
#1,628 10 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
5.6k
Forks
559
Avg merge
1d 13h
Merged PRs (30d)
34

Description

If you are submitting a **bug**, please include the following:

- [X] summary of problem
- [X] gradle or maven version
- [X] spotless version
- [X] operating system and version
- [ ] copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
- [ ] copy-paste the full content of any console errors emitted by `gradlew spotless[Apply/Check] --stacktrace`

# setup

Maven any 3.8.x

spotless 2.32.0

OS - Mac, Linux, windows

## What happened?

Reformats and destroys text blocks

source:

```
class TestClas {
@Test
public void serverFilecheck() {
assertThat(myFile())
.as("file [%s] any line contains [limitFieldSize=\"8192\"].", myFile())
.content(StandardCharsets.UTF_8)
.contains(
"""

com.diffplug.spotless
spotless-maven-plugin
2.32.0
true




2.28.0






true
4


true
2



pom.xml


false






check

validate



```

## What did you want to happen?

Maybe nudge the text block to the right, but the difference between the closing `"""` and the text MAY NOT BE ALTERED!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.