Closed blacelle closed 1 year ago
<markdown>
is a specialized <format>
. Every tag you can use inside <format>
is also available inside <markdown>
. Also order matters (see #1459). The fix here is:
<configuration>
<markdown>
<includes>
<include>**/*.md</include>
</includes>
<flexmark/>
<endWithNewline/>
</markdown>
</configuration>
With the main branch, as reproducible in https://github.com/diffplug/spotless/pull/1454, one can see that:
With a markdown file ending with a codeBlock, flexmark would format the file with 2 trailing EOL. This looks dubious, but
why not
. However, if combined with a generic format with endsWithNewLine, it leads to spotlessApply and spotlessCheck to be inconsistent which is a pity.Typical markdown (
\
used to escape markdown in markdown):Typical mvn conf: