Repository navigation
docs(guides): fix code fence languages in three guides - #53722
Conversation
A SQL query was tagged js, a pgloader command jsx, and a cURL command tsx, so they were highlighted and type-checked as JavaScript. Tag them sql and bash to match the rest of the guides.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
7 Skipped Deployments
|
|
@Santhosh-x23 is attempting to deploy a commit to the Supabase Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks for contributing to Supabase! ❤️ Our team will review your PR. A few tips for a smoother review process:
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Thanks @antlio for the quick review and merge. This was my first contribution to Supabase, and I'm glad it helped. |
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 taggedjsguides/database/import-data.mdx: thepgloader config.loadcommand is taggedjsxguides/ai/hybrid-search.mdx: a cURL command is taggedtsxThe 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:
sqlfor the query andbashfor the two shell commands (bashis 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]totextarray as [1], which is not valid Postgres, so the block is preceded by{/* prettier-ignore */}, the same convention already used inguides/ai/engineering-for-scale.mdxandguides/api/query-plans.mdx.Earlier PRs fixed the same kind of problem: #11870, #19033, #14856, #11235.
Review instructions
prettier-ignorecomment inarrays.mdx.pgloaderstep in "Import data into Supabase", and the cURL block in "Hybrid search".pnpm test:prettier. It passes for these files with the repo'sprettier.config.mjs.Checklist
/write-the-docsor/edit-the-docsskill, which applies the docs style guide. (Not run: this edit only changes code fence languages, and I applied the style guide's code block rules by hand.)