File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -13,15 +13,11 @@ const codeRegex = /^(.+)```/s;
1313
1414let errored = false ;
1515
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 {
2521 if ( crlfRegex . exec ( text ) !== null ) {
2622 return raise (
2723 "Found CRLF line endings instead of LF line endings" ,
@@ -117,11 +113,11 @@ export function parseAllSnippets() {
117113 const snippetPath = join ( categoryPath , snippet ) ;
118114 const snippetContent = readFileSync ( snippetPath ) . toString ( ) ;
119115 const snippetFileName = snippet . slice ( 0 , - 3 ) ;
120- const snippetData = parseSnippet ( {
116+ const snippetData = parseSnippet (
121117 snippetPath ,
122- name : snippetFileName ,
123- text : snippetContent ,
124- } ) ;
118+ snippetFileName ,
119+ snippetContent
120+ ) ;
125121 if ( snippetData === null ) {
126122 errored = true ;
127123 continue ;
You can’t perform that action at this time.
0 commit comments