File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
src/routes/docs/references/[version]/[platform]/[service] Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 3232 "@appwrite.io/console" : " ^0.6.4" ,
3333 "@appwrite.io/pink" : " ~0.26.0" ,
3434 "@appwrite.io/pink-icons" : " ~0.26.0" ,
35- "@appwrite.io/repo" : " github:appwrite/appwrite#0dd2f29a7eb4ed232fdb68d0af88e157ddbddba3 " ,
35+ "@appwrite.io/repo" : " github:appwrite/appwrite#31b5a1cb360b1350dd1b887e01179bce171c34bc " ,
3636 "@eslint/compat" : " ^1.4.1" ,
3737 "@eslint/js" : " ^9.39.1" ,
3838 "@fingerprintjs/fingerprintjs" : " ^4.6.2" ,
Original file line number Diff line number Diff line change @@ -148,6 +148,15 @@ function getExamples(version: string) {
148148 }
149149}
150150
151+ function stripMarkdownCodeFence ( content : string ) : string {
152+ const trimmed = content . trim ( ) ;
153+ const fenced = trimmed . match ( / ^ ` ` ` [ ^ \n ] * \n ( [ \s \S ] * ?) \n ` ` ` [ \t ] * $ / ) ;
154+ if ( fenced ) {
155+ return fenced [ 1 ] ;
156+ }
157+ return content ;
158+ }
159+
151160function filterRequestBodyProperties (
152161 requestBody : OpenAPIV3 . ReferenceObject | OpenAPIV3 . RequestBodyObject | undefined ,
153162 allowedParameters : string [ ]
@@ -508,7 +517,7 @@ export async function getService(
508517 data . methods . push ( {
509518 id : operation [ 'x-appwrite' ] . method ,
510519 group : operation [ 'x-appwrite' ] . group ,
511- demo : typeof demo === 'string' ? demo : '' ,
520+ demo : typeof demo === 'string' ? stripMarkdownCodeFence ( demo ) : '' ,
512521 title : operation . summary ?? '' ,
513522 description : operation . description ?? '' ,
514523 parameters : parameters ?? [ ] ,
You can’t perform that action at this time.
0 commit comments