orhun/git-cliff

Format markdown

Aperta

#678 aperta il 5 giu 2024

 (1 commento) (1 reazione) (0 assegnatari)Rust (308 fork)auto 404
feature/requestgood first issue

Metriche repository

Star
 (12.040 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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

Guida contributor