Skip to content

Commit bd6a9fd

Browse files
author
An Phan
committed
Better GitHub repo regex
1 parent 2486197 commit bd6a9fd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

app/site/src/components/Explore.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
<h1 class="thin">Explore</h1>
44
<ul>
55
<li v-for="tag in coolStuff">
6-
<a :href="'#' + tag"
7-
@click="filterByTag(tag)">{{ tag }}</a>
6+
<a :href="'#' + tag" @click="filterByTag(tag)">{{ tag }}</a>
87
</li>
98
</ul>
109
</section>

app/site/src/components/Item.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default {
3434
* @return {String|null}
3535
*/
3636
githubBadgeUrl() {
37-
const re = /https?:\/\/github\.com\/([A-Za-z0-9-_]*)\/([A-Za-z0-9-_]*)\/?$/i
37+
const re = /https?:\/\/github\.com\/([A-Za-z0-9-_\.]*)\/([A-Za-z0-9-_\.]*)\/?$/i
3838
const matches = re.exec(this.item.url)
3939
return matches
4040
? `https://img.shields.io/github/stars/${matches[1]}/${matches[2]}.svg?style=social&label=★`

0 commit comments

Comments
 (0)