File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,10 @@ const digitToWord = [
40
40
const langFromGithub = " ..." ;
41
41
42
42
const cssClass = langFromGithub
43
- .replace (" +" , " p " )
44
- .replace (" #" , " -Sharp" )
43
+ .replaceAll (" +" , " P " )
44
+ .replaceAll (" #" , " -Sharp" )
45
45
.replace (/ \s / g , " -" )
46
- .replace (" ." , " -" )
46
+ .replaceAll (" ." , " -" )
47
47
.replace (/ ["'()] / g , " " )
48
48
.replace (/ ^ \d / , (match ) => digitToWord[match]);
49
-
50
49
```
Original file line number Diff line number Diff line change @@ -26,10 +26,10 @@ async function main() {
26
26
const langColors = Object . keys ( langs ) . reduce ( ( acc , val ) => {
27
27
acc [
28
28
val
29
- . replace ( "+" , "p " )
30
- . replace ( "#" , "-Sharp" )
29
+ . replaceAll ( "+" , "P " )
30
+ . replaceAll ( "#" , "-Sharp" )
31
31
. replace ( / \s / g, "-" )
32
- . replace ( "." , "-" )
32
+ . replaceAll ( "." , "-" )
33
33
. replace ( / [ " ' ( ) ] / g, "" )
34
34
. replace ( / ^ \d / , ( match ) => digitToWord [ match ] )
35
35
] = langs [ val ] . color ;
Original file line number Diff line number Diff line change
610F
1
1
{
2
2
"name" : " github-lang-css" ,
3
- "version" : " 1.0.1 " ,
3
+ "version" : " 1.0.2 " ,
4
4
"description" : " github language colors in css and json" ,
5
5
"main" : " index.css" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments