File tree 1 file changed +9
-13
lines changed
1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -13,15 +13,11 @@ const codeRegex = /^(.+)```/s;
13
13
14
14
let errored = false ;
15
15
16
- function parseSnippet ( {
17
- snippetPath,
18
- name,
19
- text,
20
- } : {
21
- snippetPath : string ;
22
- name : string ;
23
- text : string ;
24
- } ) : SnippetType | null {
16
+ function parseSnippet (
17
+ snippetPath : string ,
18
+ name : string ,
19
+ text : string
20
+ ) : SnippetType | null {
25
21
if ( crlfRegex . exec ( text ) !== null ) {
26
22
return raise (
27
23
"Found CRLF line endings instead of LF line endings" ,
@@ -117,11 +113,11 @@ export function parseAllSnippets() {
117
113
const snippetPath = join ( categoryPath , snippet ) ;
118
114
const snippetContent = readFileSync ( snippetPath ) . toString ( ) ;
119
115
const snippetFileName = snippet . slice ( 0 , - 3 ) ;
120
- const snippetData = parseSnippet ( {
116
+ const snippetData = parseSnippet (
121
117
snippetPath ,
122
- name : snippetFileName ,
123
- text : snippetContent ,
124
- } ) ;
118
+ snippetFileName ,
119
+ snippetContent
120
+ ) ;
125
121
if ( snippetData === null ) {
126
122
errored = true ;
127
123
continue ;
You can’t perform that action at this time.
0 commit comments