File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -252,17 +252,13 @@ async function generateForVersion(
252252 llmsFullTxt += `${ doc . processedContent } \n\n---\n\n` ;
253253 } ) ;
254254
255- const fullFilename = isLatest
256- ? 'llms-full.txt'
257- : `llms-full-${ version } .txt` ;
255+ const fullFilename = isLatest ? 'llms-full.txt' : `llms-full-${ version } .txt` ;
258256
259257 fs . writeFileSync ( path . join ( outDir , fullFilename ) , llmsFullTxt ) ;
260258
261259 // 4. Generate individual .md files for each doc
262260 const mdFiles = processedDocs . map ( ( doc ) => {
263- const urlPath = isLatest
264- ? `/docs/${ doc . id } `
265- : `/docs/${ version } /${ doc . id } ` ;
261+ const urlPath = isLatest ? `/docs/${ doc . id } ` : `/docs/${ version } /${ doc . id } ` ;
266262
267263 const mdFilePath = path . join ( outDir , `${ urlPath } .md` ) ;
268264 const mdDir = path . dirname ( mdFilePath ) ;
Original file line number Diff line number Diff line change @@ -285,8 +285,14 @@ function renderTabsAsMarkdown(items: TabItem[]): string {
285285 */
286286async function transformStatic2Dynamic ( content : string ) : Promise < string > {
287287 // Match code fences with static2dynamic in meta
288- const fenceRegex = / ^ ( ` ` ` \w * ) \s + ( [ ^ \n ] * s t a t i c 2 d y n a m i c [ ^ \n ] * ) \n ( [ \s \S ] * ?) ^ ` ` ` $ / gm;
289- const matches : { fullMatch : string ; lang : string ; meta : string ; code : string } [ ] = [ ] ;
288+ const fenceRegex =
289+ / ^ ( ` ` ` \w * ) \s + ( [ ^ \n ] * s t a t i c 2 d y n a m i c [ ^ \n ] * ) \n ( [ \s \S ] * ?) ^ ` ` ` $ / gm;
290+ const matches : {
291+ fullMatch : string ;
292+ lang : string ;
293+ meta : string ;
294+ code : string ;
295+ } [ ] = [ ] ;
290296
291297 let match : RegExpExecArray | null ;
292298
@@ -308,10 +314,8 @@ async function transformStatic2Dynamic(content: string): Promise<string> {
308314 const langTag = m . lang || 'js' ;
309315 const metaSuffix = cleanMeta ? ` ${ cleanMeta } ` : '' ;
310316
311- const staticSection =
312- `**Static:**\n\n\`\`\`${ langTag } ${ metaSuffix } \n${ m . code } \`\`\`` ;
313- const dynamicSection =
314- `**Dynamic:**\n\n\`\`\`${ langTag } ${ metaSuffix } \n${ dynamicCode } \n\`\`\`` ;
317+ const staticSection = `**Static:**\n\n\`\`\`${ langTag } ${ metaSuffix } \n${ m . code } \`\`\`` ;
318+ const dynamicSection = `**Dynamic:**\n\n\`\`\`${ langTag } ${ metaSuffix } \n${ dynamicCode } \n\`\`\`` ;
315319
316320 return {
317321 original : m . fullMatch ,
You can’t perform that action at this time.
0 commit comments