Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format markdown #678

Open
1 task done
orhun opened this issue Jun 5, 2024 · 0 comments
Open
1 task done

Format markdown #678

orhun opened this issue Jun 5, 2024 · 0 comments
Labels
feature/request New feature or request good first issue Good for newcomers

Comments

@orhun
Copy link
Owner

orhun commented Jun 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/request New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant