Alpha: Ships on npm at 7.0.0-alpha.07.0.0-alpha.0
Highlight languages
Every language and alias a code window highlights, each with a sample line colored by the renderer's own highlighter.
A terminal section's lang, and every code window a Section type draws, names one of these. The highlighter is small and fixed: keywords, strings, comments and the added and removed lines of a diff. A name it does not know is refused at its path, as Closed sets lists.
44 names in HIGHLIGHT_LANGUAGES of @mdxui/site@7.0.0-alpha.0, each sample colored by highlight() itself, on a plate as the terminal Section type draws it.
| Name and aliases | Sample, as highlight() returns it |
|---|---|
text | |
bash sh shell zsh | |
console | |
curl | |
http | |
json jsonc | |
js javascript jsx | |
ts typescript tsx | |
py python | |
go golang | |
rb ruby | |
php | |
java | |
kt kotlin | |
cs csharp | |
rs rust | |
swift | |
sql | |
graphql gql | |
yaml yml | |
toml | |
ini | |
env dotenv | |
html | |
xml | |
diff patch | |