IndigoUnited / node-detect-readme-badges

Scans a repository's readme file, searching for badges
MIT License
5 stars 9 forks source link

doesn't detect badges if they are split with newline #43

Open stalniy opened 6 years ago

stalniy commented 6 years ago

By looking at stats for my package: https://api.npms.io/v2/package/bdd-lazy-var I see that there is only 1 badge, however in the README there are 4 badges!

Each badge is written on new line. I see that some projects put all badges in the single line and then this packages successfully detects all of them but this decreases readability and maintainability of the file (hard to detect which badge was added/removed, hard to add remove one, need to be careful to not remove some symbols, etc)

For example:

# BDD + lazy variable definition (aka rspec)

[![BDD Lazy Var NPM version](https://badge.fury.io/js/bdd-lazy-var.svg)](http://badge.fury.io/js/bdd-lazy-var)
[![Build Status](https://travis-ci.org/stalniy/bdd-lazy-var.svg?branch=master)](https://travis-ci.org/stalniy/bdd-lazy-var)
[![Maintainability](https://api.codeclimate.com/v1/badges/65f79ae494101ba5f757/maintainability)](https://codeclimate.com/github/stalniy/bdd-lazy-var/maintainability)
[![BDD Lazy Var Join the chat at https://gitter.im/bdd-lazy-var/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/bdd-lazy-var/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
zebateira commented 6 years ago

codeclimate and fury are not supported yet, but gitter and travis are, so you should get 2 badges at least. Will look into it. If you want to have the other two badges supported you can do a PR :)