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

Wrapping of badge lines #437

Open
LecrisUT opened this issue Apr 24, 2024 · 0 comments
Open

Wrapping of badge lines #437

LecrisUT opened this issue Apr 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@LecrisUT
Copy link

LecrisUT commented Apr 24, 2024

Describe the bug

context
I was adding badges in this PR, and the project's pre-commit (which uses mdformat, don't know which version) was suggesting a change like:

- [![Release Status][release-badge]][release-link]
- [![Fedora Status][fedora-badge]][fedora-link]
+ [![Release Status][release-badge]][release-link] [![Fedora Status][fedora-badge]][fedora-link]                
[![Spack Status][spack-badge]][spack-link] 

Probably because --wrap=100 is used.

expectation

For badge lines it would make more sense to keep them as individual lines to better support git navigation.

It would be nice to have a way to disable this formatting for specific sections. Like # format: off

Reproduce the bug

mdformat --wrap 100 on:

[![Release Status][release-badge]][release-link]
[![Fedora Status][fedora-badge]][fedora-link]
[![Spack Status][spack-badge]][spack-link]

[fedora-badge]: https://img.shields.io/fedora/v/cp2k
[fedora-link]: https://src.fedoraproject.org/rpms/cp2k
[release-badge]: https://img.shields.io/github/v/release/cp2k/cp2k
[release-link]: https://github.com/cp2k/cp2k/releases
[spack-badge]: https://img.shields.io/spack/v/cp2k
[spack-link]: https://packages.spack.io/package.html?name=cp2k
@LecrisUT LecrisUT added the bug Something isn't working label Apr 24, 2024
@LecrisUT LecrisUT mentioned this issue Apr 26, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant