Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

changed from includes to startsWith

Ollie Halliday5afcea409d7b
diff --git a/apps/docs/components/reference/RefFunctionSection.tsx b/apps/docs/components/reference/RefFunctionSection.tsx
index d2021223259..5cdacd0d458 100644
--- a/apps/docs/components/reference/RefFunctionSection.tsx
+++ b/apps/docs/components/reference/RefFunctionSection.tsx
@@ -131,11 +131,11 @@ const RefFunctionSection: React.FC<IRefFunctionSection> = (props) => {
item.examples.map((example, exampleIndex) => {
const exampleString = ''
- const codeBlockLang = example?.code?.includes('```js')
+ const codeBlockLang = example?.code?.startsWith('```js')
? 'js'
- : example?.code?.includes('```ts')
+ : example?.code?.startsWith('```ts')
? 'ts'
- : example?.code?.includes('```dart')
+ : example?.code?.startsWith('```dart')
? 'dart'
: 'js'
// `