Skip to content

Wrapping of badge lines #437

@LecrisUT

Description

@LecrisUT

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions