rouge
rouge copied to clipboard
Support for syntax highlighting for Prisma schemas
Is your enhancement request related to a problem? Please describe.
Prisma is a database toolkit that comes with its own data modeling language to define the so-called Prisma schema.
Right now, Prisma schemas don't have proper syntax highlighting in dev.to articles because their syntax highlighting is based on rouge
.
Describe the solution you'd like
Ideally, dev.to could support the prisma
annotation on fenced code blocks to render Prisma schemas more colorful! For example:
```prisma
datasource db {
url = env("DATABASE_URL")
provider = "postgresql"
}
generator client {
provider = "prisma-client-js"
}
model User {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
email String @unique
name String?
role Role @default(USER)
posts Post[]
}
model Post {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
published Boolean @default(false)
title String
author User? @relation(fields: [authorId], references: [id])
authorId Int?
}
enum Role {
USER
ADMIN
}
```
Additional context
This has been enabled on GitHub already (see here).
This is the PR that enabled syntax highlighting for Prisma schemas on GitHub: https://github.com/github/linguist/pull/4668#issuecomment-541354215
I also opened a similar issue in the forem/forem
repo (which is the source code for dev.to): https://github.com/forem/forem/issues/10467#issuecomment-700073251
This issue has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days. If you would like this issue to remain open, please reply and let us know if the issue is still reproducible.
Commenting so this issue won't be considered stale 🙏