orhun/git-cliff

Format markdown

开放

#678 创建于 2024年6月5日

 (1 条评论) (1 个反应) (0 位负责人)Rust (308 个派生)auto 404
feature/requestgood first issue

仓库指标

星标
 (12,040 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南