Skip to content
This repository was archived by the owner on May 8, 2024. It is now read-only.

Commit 0ee5f23

Browse files
committed
Allow label field to be optional.
This allows partial header parsing for secondary files (which are not allowed to have full headers due to `types-publisher`).
1 parent 309207d commit 0ee5f23

File tree

3 files changed

+888
-1
lines changed

3 files changed

+888
-1
lines changed

src/parser/lax.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export let repo: P.Parser<model.Repository> = P.string('// Definitions: ')
177177

178178
export let header: P.Parser<model.Header> = bomOpt
179179
.then(P.seq(
180-
label.skip(linebreak),
180+
label.skip(linebreak).or(P.of(null)),
181181
project.skip(linebreak),
182182
authors.skip(linebreak),
183183
repo.skip(linebreak)
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
parsed:
3+
label: null
4+
project:
5+
-
6+
url: "http://jquery.com"
7+
authors:
8+
-
9+
name: Boris Yankov
10+
url: "https://github.com/borisyankov"
11+
-
12+
name: Christian Hoffmeister
13+
url: "https://github.com/choffmeister"
14+
-
15+
name: Steve Fenton
16+
url: "https://github.com/Steve-Fenton"
17+
-
18+
name: Diullei Gomes
19+
url: "https://github.com/Diullei"
20+
-
21+
name: Tass Iliopoulos
22+
url: "https://github.com/tasoili"
23+
-
24+
name: Jason Swearingen
25+
url: "https://github.com/jasons-novaleaf"
26+
-
27+
name: Sean Hill
28+
url: "https://github.com/seanski"
29+
-
30+
name: Guus Goossens
31+
url: "https://github.com/Guuz"
32+
-
33+
name: Kelly Summerlin
34+
url: "https://github.com/ksummerlin"
35+
-
36+
name: Basarat Ali Syed
37+
url: "https://github.com/basarat"
38+
-
39+
name: Nicholas Wolverson
40+
url: "https://github.com/nwolverson"
41+
-
42+
name: Derek Cicerone
43+
url: "https://github.com/derekcicerone"
44+
-
45+
name: Andrew Gaspar
46+
url: "https://github.com/AndrewGaspar"
47+
-
48+
name: Seikichi Kondo
49+
url: "https://github.com/seikichi"
50+
-
51+
name: Benjamin Jackman
52+
url: "https://github.com/benjaminjackman"
53+
-
54+
name: Poul Sorensen
55+
url: "https://github.com/s093294"
56+
-
57+
name: Josh Strobl
58+
url: "https://github.com/JoshStrobl"
59+
-
60+
name: John Reilly
61+
url: "https://github.com/johnnyreilly"
62+
-
63+
name: Dick van den Brink
64+
url: "https://github.com/DickvdBrink"
65+
-
66+
name: Thomas Schulz
67+
url: "https://github.com/King2500"
68+
-
69+
name: Leonard Thieu
70+
url: "https://github.com/leonard-thieu"
71+
-
72+
name: Andre Wiggins
73+
url: "https://github.com/andrewiggins"
74+
repository:
75+
url: "https://github.com/DefinitelyTyped/DefinitelyTyped"

0 commit comments

Comments
 (0)