Skip to content

Commit 9dbeefe

Browse files
authored
fix: removes comments after a value in axis registry (#126)
* fix: removes comments after a value * chore: update axis registry
1 parent 6f47835 commit 9dbeefe

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

data/axis-registry.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"tag": "EHLT",
2929
"min": 0,
3030
"max": 1000,
31-
"default": null,
31+
"default": 12,
3232
"precision": 0
3333
},
3434
{
@@ -52,7 +52,7 @@
5252
"tag": "EDPT",
5353
"min": 0,
5454
"max": 1000,
55-
"default": null,
55+
"default": 100,
5656
"precision": 0
5757
},
5858
{
@@ -268,7 +268,7 @@
268268
"tag": "YTFI",
269269
"min": -1000,
270270
"max": 2000,
271-
"default": null,
271+
"default": 600,
272272
"precision": 0
273273
},
274274
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "google-font-metadata",
33
"description": "A metadata generator for Google Fonts.",
4-
"version": "5.1.4",
4+
"version": "5.1.5",
55
"author": "Ayuhito <hello@ayuhito.com>",
66
"main": "./dist/index.js",
77
"module": "./dist/index.mjs",

src/axis-gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const downloadAxis = async (axis: AxisProto): Promise<AxisObject> => {
7878
for (const line of lines) {
7979
const [key, value] = line.split(':');
8080
// @ts-ignore - these are known tags
81-
data[key.trim()] = value.trim().replace(/"/g, '');
81+
data[key.trim()] = value.split('#')[0].trim().replace(/"/g, ''); // remove comments and quotes
8282
}
8383

8484
const result = {

0 commit comments

Comments
 (0)