orhun/git-cliff

Format markdown

Offen

#678 geöffnet am 05.06.2024

 (1 Kommentar) (1 Reaktion) (0 zugewiesene Personen)Rust (308 Forks)auto 404
feature/requestgood first issue

Repository-Metriken

Stars
 (12.040 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

Writing a Tera template with perfect formatting is hard. Tweaking things with {%- instead of {% and trim = true is sometimes annoying.

Desired solution

git-cliff should support outputting the formatted markdown file. e.g.

[changelog]
# formats the changelog (only supports markdown)
format = true

We can use a crate like prettify-markdown or something similar (and more up-to-date maybe).

We can detect markdown files by simply looking at the extension (.md).

Alternatives considered

Users can always configure postprocessors to do markdown formatting:

[changelog]
postprocessors = [
  { pattern = '.*', replace_command = "mdformat -" },
]

But I think it is better to support this feature out-of-the-box.

Additional context

No response

Contributor Guide