Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Asciidoc formatter deletes content after upgrade to 3.10.x

Open
#3,120 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active

Research direction

Start with the AsciiDoc formatter and reproduce the issue using the supplied document through the Maven plugin, comparing Spotless 3.9.0 with 3.10.3. Trace the formatting of table cells containing wrapped text; done means the sentence “Achtung: nicht jeder Stakeholder hat ein Interesse am Projekterfolg.” remains intact after formatting.

Written by the indexing model from the issue text.

Description

I'm using Spotless to format my AsciiDoc documents. When upgrading Spotless to 3.10.3 the AsciiDoc formatter somehow deletes text in table columns while reformatting. This worked fine in version 3.9.0.

I'm using Spotless with Maven:

      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>${spotless-maven-plugin.version}</version>
        <configuration>
          <asciidoc>
            <includes>
              <include>**/*.adoc</include>
            </includes>
            <excludes>
              <exclude>target/**</exclude>
            </excludes>
            <adocfmt>
              <normalizeListBullets>true</normalizeListBullets>
            </adocfmt>
          </asciidoc>
          <markdown>
            <includes>
              <include>**/*.md</include>
            </includes>
            <excludes>
              <exclude>target/**</exclude>
            </excludes>
            <flexmark />
          </markdown>
          <pom>
            <sortPom>
              <expandEmptyElements>false</expandEmptyElements>
              <sortDependencies>scope,groupId,artifactId</sortDependencies>
              <sortDependencyExclusions>groupId,artifactId</sortDependencyExclusions>
              <spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
            </sortPom>
          </pom>
          <yaml>
            <includes>
              <include>**/*.yaml</include>
            </includes>
            <excludes>
              <exclude>target/**</exclude>
            </excludes>
          </yaml>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

I'm using the input document (formatted with Spotless 3.9.0):

= Softwareengineering 1 - Spezifikationsvorlage
Prof. Dr. Ullrich Hafner <[email protected]>

:!chapter-signifier:
:xrefstyle: short
:sectnums:
:partnums:

== Stakeholder

[TIP]
====
Ein Stakeholder (Interessenvertretung) ist eine Person, die von der Durchführung oder Einführung eines Projekts betroffen ist. Stakeholder sind die zentrale Quelle für Anforderungen an das System. In diesem Abschnitt werden die Stakeholder tabellarisch mit ihrem Namen aufgeführt.
====

=== Vorname Nachname von Stakeholder 1

[cols="3,9"]
|===
|{set:cellbgcolor:#e8e8e8} *Projektrolle*
|{set:cellbgcolor:!} Welche Rolle bzw. Funktion hat der Stakeholder im Projekt. Nicht zu verwechseln mit der Rolle im zu erstellenden System.
|{set:cellbgcolor:#e8e8e8} *Raum*
|{set:cellbgcolor:!}
|{set:cellbgcolor:#e8e8e8} *Telefon*
|{set:cellbgcolor:!}
|{set:cellbgcolor:#e8e8e8} *Email*
|{set:cellbgcolor:!}
|{set:cellbgcolor:#e8e8e8} *Verfügbarkeit*
|{set:cellbgcolor:!} Von wann bis wann ist der Stakeholder für das Projekt verfügbar. Wichtiger Punkt, um Meetings, Workshops oder ähnliches zu planen.
|{set:cellbgcolor:#e8e8e8} *Wissen*
|{set:cellbgcolor:!} Welches Wissensgebiet bzw. welchen Wissensumfang hat der Stakeholder.
|{set:cellbgcolor:#e8e8e8} *Interessen und Ziele*
|{set:cellbgcolor:!} Welche Interessen und Ziele bezogen auf das Projekt hat der Stakeholder. Achtung: nicht jeder
Stakeholder hat ein Interesse am Projekterfolg.
|{set:cellbgcolor:#e8e8e8} *Relevanz*
|{set:cellbgcolor:!} Wie relevant ist der Stakeholder für das Projekt.
|===

When running Ppotless in version 3.10.3 I get the new document:

= Softwareengineering 1 - Spezifikationsvorlage
Prof. Dr. Ullrich Hafner <[email protected]>

:!chapter-signifier:
:xrefstyle: short
:sectnums:
:partnums:

== Stakeholder

[TIP]
====
Ein Stakeholder (Interessenvertretung) ist eine Person, die von der Durchführung oder Einführung eines Projekts betroffen ist. Stakeholder sind die zentrale Quelle für Anforderungen an das System. In diesem Abschnitt werden die Stakeholder tabellarisch mit ihrem Namen aufgeführt.
====

=== Vorname Nachname von Stakeholder 1

[cols="3,9"]
|===
| {set:cellbgcolor:#e8e8e8} *Projektrolle*
| {set:cellbgcolor:!} Welche Rolle bzw. Funktion hat der Stakeholder im Projekt. Nicht zu verwechseln mit der Rolle im zu erstellenden System.
| {set:cellbgcolor:#e8e8e8} *Raum*
| {set:cellbgcolor:!}

| {set:cellbgcolor:#e8e8e8} *Telefon*
| {set:cellbgcolor:!}

| {set:cellbgcolor:#e8e8e8} *Email*
| {set:cellbgcolor:!}

| {set:cellbgcolor:#e8e8e8} *Verfügbarkeit*
| {set:cellbgcolor:!} Von wann bis wann ist der Stakeholder für das Projekt verfügbar. Wichtiger Punkt, um Meetings, Workshops oder ähnliches zu planen.

| {set:cellbgcolor:#e8e8e8} *Wissen*
| {set:cellbgcolor:!} Welches Wissensgebiet bzw. welchen Wissensumfang hat der Stakeholder.

| {set:cellbgcolor:#e8e8e8} *Interessen und Ziele*
| {set:cellbgcolor:!} Welche Interessen und Ziele bezogen auf das Projekt hat der Stakeholder. Achtung: nicht jeder

| {set:cellbgcolor:#e8e8e8} *Relevanz*
| {set:cellbgcolor:!} Wie relevant ist der Stakeholder für das Projekt.
|===

The last sentence "Achtung: nicht jeder Stakeholder hat ein Interesse am Projekterfolg." is now cropped.

Image
Dominant language
Java
Stars
5.7k
Forks
563
Avg merge
1d 7h
Merged PRs (30d)
51

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from diffplug/spotless

All issues in diffplug/spotless

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.