Expected behavior
It should show the correct badge
Additional context
On the shields.io documentation, there is the following part:
Using dash "-" separator
https://img.shields.io/badge/<LABEL>-<MESSAGE>-<COLOR>
Dashes -- β - Dash
Underscores __ β _ Underscore
_ or Space β Space
Because shields.io uses dashes to separate the variables, if we want a dash in our version number, we actually need to put two dashes.
So, when building a shield badge, we should first replace all dashes with double dashes, all underscors with double underscores, and all spaces with underscores
Describe the bug If the project has a version number containing dashes, it will break the version badge.
To Reproduce Steps to reproduce the behavior:
npx readme-md-generator
Expected behavior It should show the correct badge
Additional context On the shields.io documentation, there is the following part:
Because shields.io uses dashes to separate the variables, if we want a dash in our version number, we actually need to put two dashes.
So, when building a shield badge, we should first replace all dashes with double dashes, all underscors with double underscores, and all spaces with underscores