mirror of
https://github.com/vuejs/awesome-vue.git
synced 2024-11-20 11:16:40 -05:00
Better GitHub repo regex
This commit is contained in:
parent
24861974bf
commit
bd6a9fde01
2 changed files with 2 additions and 3 deletions
|
@ -3,8 +3,7 @@
|
|||
<h1 class="thin">Explore</h1>
|
||||
<ul>
|
||||
<li v-for="tag in coolStuff">
|
||||
<a :href="'#' + tag"
|
||||
@click="filterByTag(tag)">{{ tag }}</a>
|
||||
<a :href="'#' + tag" @click="filterByTag(tag)">{{ tag }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
|
|
@ -34,7 +34,7 @@ export default {
|
|||
* @return {String|null}
|
||||
*/
|
||||
githubBadgeUrl() {
|
||||
const re = /https?:\/\/github\.com\/([A-Za-z0-9-_]*)\/([A-Za-z0-9-_]*)\/?$/i
|
||||
const re = /https?:\/\/github\.com\/([A-Za-z0-9-_\.]*)\/([A-Za-z0-9-_\.]*)\/?$/i
|
||||
const matches = re.exec(this.item.url)
|
||||
return matches
|
||||
? `https://img.shields.io/github/stars/${matches[1]}/${matches[2]}.svg?style=social&label=★`
|
||||
|
|
Loading…
Reference in a new issue