@@ -90,7 +90,7 @@ async function convertToMDX(
9090 "{{LLM_DOCS}}" ,
9191 await readFile (
9292 __dirname +
93- "/../src/content/docs/development/guide/component-docs-for-llm.mdx" ,
93+ "/../src/content/docs/development/guide/component-docs-for-llm.mdx" ,
9494 "utf8"
9595 )
9696 ) ;
@@ -254,7 +254,11 @@ description: Auto‑generated from cppreference
254254// curl --location --request POST "https://api.imgbb.com/1/upload?expiration=600&key=YOUR_CLIENT_API_KEY" --form "image=R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
255255async function uploadImageToImgBB ( imageBuffer : Buffer ) : Promise < string > {
256256 const formData = new FormData ( ) ;
257- formData . append ( "image" , new Blob ( [ new Uint8Array ( imageBuffer ) ] ) , "diff.webp" ) ;
257+ formData . append (
258+ "image" ,
259+ new Blob ( [ new Uint8Array ( imageBuffer ) ] ) ,
260+ "diff.webp"
261+ ) ;
258262 formData . append ( "name" , "diff.webp" ) ;
259263
260264 const response = await fetch (
@@ -419,10 +423,18 @@ async function main() {
419423 await writeMDXFile ( filePath , mdx , title ) ;
420424
421425 console . log ( ` 尝试构建...` ) ;
422- const res = spawnSync ( `npm` , [ "run" , "build" ] , { stdio : "inherit" , shell : true } ) ;
426+ const res = spawnSync ( `npm` , [ "run" , "build" ] , {
427+ stdio : "inherit" ,
428+ shell : true ,
429+ } ) ;
423430 if ( res . status !== 0 ) {
424431 throw new Error (
425- "构建失败,可能生成的MDX有问题:" + res . stderr ?. toString ( ) + res . stdout ?. toString ( ) + res . error ?. toString ( ) + " exit code " + res . status
432+ "构建失败,可能生成的MDX有问题:" +
433+ res . stderr ?. toString ( ) +
434+ res . stdout ?. toString ( ) +
435+ res . error ?. toString ( ) +
436+ " exit code " +
437+ res . status
426438 ) ;
427439 }
428440
0 commit comments