Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Asciidoc formatter deletes content after upgrade to 3.10.x

未关闭
#3,120 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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
主要语言
Java
星标
5.7k
派生
563
平均合并
1 天 8 小时
30 天内合并 PR
52

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

diffplug/spotless 的其他 Issue

查看 diffplug/spotless 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。