File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ author: "platane"
44
55runs :
66 using : docker
7- image : docker://platane/snk@sha256:89466e404c3d3ba2384e24aabad0542a643eacdc53d0c6320ce369cc1af19d56
7+ image : docker://platane/snk@sha256:dcb351bdad223f2a2161fa5d6e3c9102e6ebe9fbde99a10fa3bf443d69f61a0f
88
99inputs :
1010 github_user_name :
Original file line number Diff line number Diff line change 11{
22 "name" : " snk" ,
33 "description" : " Generates a snake game from a github user contributions grid" ,
4- "version" : " 2.1 .0" ,
4+ "version" : " 2.2 .0" ,
55 "private" : true ,
66 "repository" : " github:platane/snk" ,
77 "devDependencies" : {
Original file line number Diff line number Diff line change @@ -84,11 +84,12 @@ const parseUserPage = (content) => {
8484 . split ( "</svg>" ) [ 0 ] ;
8585 let x = 0 ;
8686 let lastYAttribute = 0 ;
87- const rects = Array . from ( block . matchAll ( / < r e c t [ ^ > ] * > / g) ) . map ( ( [ m ] ) => {
87+ const rects = Array . from ( block . matchAll ( / < r e c t [ ^ > ] * > [ ^ < ] * < \/ r e c t > / g) ) . map ( ( [ m ] ) => {
8888 const date = m . match ( / d a t a - d a t e = " ( [ ^ " ] + ) " / ) [ 1 ] ;
89- const count = + m . match ( / d a t a - c o u n t = " ( [ ^ " ] + ) " / ) [ 1 ] ;
9089 const level = + m . match ( / d a t a - l e v e l = " ( [ ^ " ] + ) " / ) [ 1 ] ;
9190 const yAttribute = + m . match ( / y = " ( [ ^ " ] + ) " / ) [ 1 ] ;
91+ const literalCount = m . match ( / ( N o | \d + ) c o n t r i b u t i o n s ? o n / ) [ 1 ] ;
92+ const count = literalCount === "No" ? 0 : + literalCount ;
9293 if ( lastYAttribute > yAttribute )
9394 x ++ ;
9495 lastYAttribute = yAttribute ;
You can’t perform that action at this time.
0 commit comments