Skip to content

Commit 7d97aa9

Browse files
authored
Merge pull request #285 from AlexV525/fix/count-parse
🐛 Fix contribution count's regular expression parsing
2 parents d0034a9 + 785be4a commit 7d97aa9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/iso.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,10 @@ const setContainerViewType = (type) => {
142142

143143
const getCountFromNode = (node) => {
144144
// Contribution label formats:
145-
// No contributions on January 9, 2023
146-
// 1 contribution on January 10, 2023
147-
const contributionMatches = node.innerHTML.match(/(\d*|No) contributions? on ((.*) (\d{1,2}), (\d{4,}))/)
145+
// No contributions on January 9th
146+
// 1 contribution on January 10th.
147+
// 2 contributions on August 31st.
148+
const contributionMatches = node.innerHTML.match(/(\d*|No) contributions? on (.*)./)
148149

149150
if (!contributionMatches) {
150151
return 0

0 commit comments

Comments
 (0)