Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to display highlighted code #6546

Open
Jinghao1209 opened this issue Dec 22, 2024 · 1 comment
Open

Unable to display highlighted code #6546

Jinghao1209 opened this issue Dec 22, 2024 · 1 comment
Assignees
Labels
docs Documentation creation, updates or corrections

Comments

@Jinghao1209
Copy link

Some example

Website docs: https://www.prisma.io/docs/orm/prisma-schema/data-model/relations/referential-actions#example-of-catching-errors

```ts highlight=14;delete|15;add
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
async function main() {
try {
await prisma.user.delete({
where: {
id: 'some-long-id'
}
})
} catch (error) {
if (error instanceof Prisma.PrismaClientKnownRequestError) {
if (error.code === 'P2014') {
if (error.code === 'P2003') {
console.log(error.message)
}
}
}
}
main()
```

the main code:

- if (error.code === 'P2014') {
+ if (error.code === 'P2003') {

needs to be displayed instead of (screenshot from website)
Screenshot 2024-12-23 03:23:36

Is this a problem? Or is the highlighted code limited to certain situations?

Copy link
Member

jharrell commented Jan 6, 2025

Thank you for catching this! This is indeed an issue. This uses our previous version of highlighting and will be updated to the current syntax.

@jharrell jharrell self-assigned this Jan 6, 2025
@jharrell jharrell added the docs Documentation creation, updates or corrections label Jan 6, 2025 — with Linear
@jharrell jharrell removed the website label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation creation, updates or corrections
Projects
None yet
Development

No branches or pull requests

2 participants