Skip to content

Update coding fence from js to ts - #11870

Merged
silentworks merged 1 commit into
masterfrom
chore/update-listbuckets-code-highlighting
Jan 23, 2023
Merged

silentworks merged 1 commit into
masterfrom
chore/update-listbuckets-code-highlighting

Conversation

@silentworks

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Docs bug fix

What is the current behavior?

Not rendering the full method name listBucke()

What is the new behavior?

Renders full method name listBuckets()

Additional context

Add any other context or screenshots.

@silentworks
silentworks requested a review from a team as a code owner January 23, 2023 17:16
@vercel

vercel Bot commented Jan 23, 2023 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 23, 2023 at 5:20PM (UTC)
supabase-studio-prod ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 23, 2023 at 5:20PM (UTC)
supabase-studio-staging ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 23, 2023 at 5:20PM (UTC)
zone-www-dot-com ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 23, 2023 at 5:20PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
about ⬜️ Ignored (Inspect) Jan 23, 2023 at 5:20PM (UTC)

@silentworks
silentworks merged commit 674f119 into master Jan 23, 2023
@silentworks
silentworks deleted the chore/update-listbuckets-code-highlighting branch January 23, 2023 23:11
antlio pushed a commit that referenced this pull request Nov 20, 2026
## Problem

Three code blocks in the docs guides use the wrong language tag, so they
are highlighted and type-checked as JavaScript or TypeScript instead of
what they are:

- `guides/database/arrays.mdx`: a SQL query is tagged `js`
- `guides/database/import-data.mdx`: the `pgloader config.load` command
is tagged `jsx`
- `guides/ai/hybrid-search.mdx`: a cURL command is tagged `tsx`

The docs style guide says JavaScript and TypeScript blocks get type
hints and are formatted by Prettier, which does not apply to these
blocks.

## Solution

Retag the blocks: `sql` for the query and `bash` for the two shell
commands (`bash` is the most common shell tag in the guides).

For the SQL block I also lowercased the keywords, per the style guide's
"Prefer lowercase for SQL". Prettier's SQL plugin rewrites
`textarray[1]` to `textarray as [1]`, which is not valid Postgres, so
the block is preceded by `{/* prettier-ignore */}`, the same convention
already used in `guides/ai/engineering-for-scale.mdx` and
`guides/api/query-plans.mdx`.

Earlier PRs fixed the same kind of problem: #11870, #19033, #14856,
#11235.

## Review instructions

1. Open the diff: only the language tags change, plus the lowercase SQL
and the `prettier-ignore` comment in `arrays.mdx`.
2. Check the three pages in the preview: the SQL block in the SQL tab of
"Working with arrays", the `pgloader` step in "Import data into
Supabase", and the cURL block in "Hybrid search".
3. Run `pnpm test:prettier`. It passes for these files with the repo's
`prettier.config.mjs`.

## Checklist

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide).
(Not run: this edit only changes code fence languages, and I applied the
style guide's code block rules by hand.)

Co-authored-by: Santhosh-x23 <[email protected]>

This branch was successfully deployed

4 active deployments
Preview – supabase-studio-prod — ce337144 Deployed Jan 23, 2023 by vercel[bot]
Preview – zone-www-dot-com — ce337144 Deployed Jan 23, 2023 by vercel[bot]
Preview – supabase-studio-staging — ce337144 Deployed Jan 23, 2023 by vercel[bot]
Preview – docs — ce337144 Deployed Jan 23, 2023 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants