Languages¶
ubc build html and ubc build pdf colour a code block from a bundled
grammar, chosen by the language name you write:
.. code-block:: python
print("hello")
This page lists the names the two builders answer.
The table is generated from the engine that ships, and a test compares it
against a fresh generation on every build of this project,
so a name listed here is a name ubc resolves,
and every name ubc will suggest to you is listed here.
(A handful of spellings resolve without being listed; Reading the table says which and why.)
How a name is resolved¶
Three steps, in order, and the first answer wins:
your own aliases, if the project declares any;
the built-in table, which is the one the rows below are drawn from;
the grammar collection’s own names, as a fall-back.
Names are matched ignoring case and surrounding whitespace,
so Python, python and `` python `` are one name.
A name none of the three steps answers is reported as
build.highlight_language_unknown,
once per name for the whole build —
with up to three of the places it is written, and a count of all of them —
and with a did you mean suggestion when a close spelling exists;
and under the default --deny warning that stops the build.
The block is still drawn, uncoloured.
Reading the table¶
- Language
The grammar’s own name, as the collection publishes it.
- Names you can write
Every name that reaches that grammar. Write any one of them.
- Grammar
The Sublime-syntax scope the colouring comes from. It is the useful thing to quote in a bug report about a mis-coloured block.
- Source
ubCodefor a grammar written and maintained in this repository,bat collectionfor one of the third-party definitions curated by the bat project and shipped withubc. The third-party definitions’ licences travel with the binary inTHIRD-PARTY-NOTICES-syntaxes.md.
The first row is the one that turns colouring off:
a block written .. code-block:: text — or none, plain,
plaintext, raw or output — is drawn plain and reports nothing,
which is how you silence the finding for a listing that is not code at all.
Two things the table deliberately leaves out.
A grammar’s file extensions also resolve today
(.. code-block:: pyi colours as Python),
but they are not promised and not listed:
they are a fall-back rather than a name this project has decided to support.
And a name of your own is not here by definition — declare one with
[build.highlight] aliases
and it wins over everything in the table.
Note
Both builders and the VS Code preview read this table, so a listing is coloured by the same grammar on the site, on paper and in the editor.
Supported names¶
Language |
Names you can write |
Grammar |
Source |
|---|---|---|---|
(plain) |
|
— |
— |
ActionScript |
|
|
bat collection |
Ada |
|
|
bat collection |
Apache Conf |
|
|
bat collection |
AppleScript |
|
|
bat collection |
ARM Assembly |
|
|
bat collection |
AsciiDoc (Asciidoctor) |
|
|
bat collection |
Authorized Keys |
|
|
bat collection |
AWK |
|
|
bat collection |
Batch File |
|
|
bat collection |
BibTeX |
|
|
bat collection |
Bourne Again Shell (bash) |
|
|
bat collection |
C |
|
|
bat collection |
C# |
|
|
bat collection |
C++ |
|
|
bat collection |
Cabal |
|
|
bat collection |
camlp4 |
|
|
bat collection |
CFML |
|
|
bat collection |
Clojure |
|
|
bat collection |
CMake |
|
|
bat collection |
CMake C Header |
|
|
bat collection |
CMake C++ Header |
|
|
bat collection |
CMakeCache |
|
|
bat collection |
CoffeeScript |
|
|
bat collection |
Comma Separated Values |
|
|
bat collection |
Command Help |
|
|
bat collection |
CpuInfo |
|
|
bat collection |
Crontab |
|
|
bat collection |
Crystal |
|
|
bat collection |
CSS |
|
|
bat collection |
Cypher |
|
|
ubCode |
D |
|
|
bat collection |
Dart |
|
|
bat collection |
debsources |
|
|
bat collection |
Diff |
|
|
bat collection |
Dockerfile |
|
|
bat collection |
Dockerfile (with bash) |
|
|
bat collection |
DotENV |
|
|
bat collection |
Elixir |
|
|
bat collection |
Elm |
|
|
bat collection |
|
|
bat collection |
|
Erlang |
|
|
bat collection |
F# |
|
|
bat collection |
Fish |
|
|
bat collection |
Fortran (Fixed Form) |
|
|
bat collection |
Fortran (Modern) |
|
|
bat collection |
Fortran Namelist |
|
|
bat collection |
fstab |
|
|
bat collection |
GDScript (Godot Engine) |
|
|
bat collection |
Git Attributes |
|
|
bat collection |
Git Commit |
|
|
bat collection |
Git Config |
|
|
bat collection |
Git Ignore |
|
|
bat collection |
Git Link |
|
|
bat collection |
Git Log |
|
|
bat collection |
Git Mailmap |
|
|
bat collection |
Git Rebase Todo |
|
|
bat collection |
GLSL |
|
|
bat collection |
gnuplot |
|
|
bat collection |
Go |
|
|
bat collection |
Gomod |
|
|
bat collection |
Gosum |
|
|
bat collection |
GraphQL |
|
|
bat collection |
Graphviz (DOT) |
|
|
bat collection |
Groff/troff |
|
|
bat collection |
Groovy |
|
|
bat collection |
group |
|
|
bat collection |
Haskell |
|
|
bat collection |
Highlight non-printables |
|
|
bat collection |
Hosts File |
|
|
bat collection |
HTML |
|
|
bat collection |
HTML (ASP) |
|
|
bat collection |
HTML (EEx) |
|
|
bat collection |
HTML (Erlang) |
|
|
bat collection |
HTML (Jinja2) |
|
|
bat collection |
HTML (Rails) |
|
|
bat collection |
HTML (Tcl) |
|
|
bat collection |
HTML (Twig) |
|
|
bat collection |
HTTP Request and Response |
|
|
bat collection |
Idris |
|
|
bat collection |
INI |
|
|
bat collection |
Java |
|
|
bat collection |
Java Properties |
|
|
bat collection |
Java Server Page (JSP) |
|
|
bat collection |
JavaScript |
|
|
bat collection |
JavaScript (Babel) |
|
|
bat collection |
JavaScript (Rails) |
|
|
bat collection |
Jinja2 |
|
|
bat collection |
JQ |
|
|
bat collection |
JSON |
|
|
bat collection |
jsonnet |
|
|
bat collection |
Julia |
|
|
bat collection |
Known Hosts |
|
|
bat collection |
Kotlin |
|
|
bat collection |
LaTeX |
|
|
bat collection |
LaTeX Log |
|
|
bat collection |
Lean 4 |
|
|
bat collection |
Less |
|
|
bat collection |
Lisp |
|
|
bat collection |
Literate Haskell |
|
|
bat collection |
LiveScript |
|
|
bat collection |
LLVM |
|
|
bat collection |
log |
|
|
bat collection |
Lua |
|
|
bat collection |
Makefile |
|
|
bat collection |
Manpage |
|
|
bat collection |
Markdown |
|
|
bat collection |
MATLAB |
|
|
bat collection |
MediaWiki |
|
|
bat collection |
MemInfo |
|
|
bat collection |
MultiMarkdown |
|
|
bat collection |
MyST |
|
|
ubCode |
NAnt Build File |
|
|
bat collection |
nginx |
|
|
bat collection |
Nim |
|
|
bat collection |
Ninja |
|
|
bat collection |
Nix |
|
|
bat collection |
NSIS |
|
|
bat collection |
Objective-C |
|
|
bat collection |
Objective-C++ |
|
|
bat collection |
OCaml |
|
|
bat collection |
OCamllex |
|
|
bat collection |
OCamlyacc |
|
|
bat collection |
Odin |
|
|
bat collection |
orgmode |
|
|
bat collection |
Pascal |
|
|
bat collection |
passwd |
|
|
bat collection |
Perl |
|
|
bat collection |
PHP |
|
|
bat collection |
Pipe Separated Values |
|
|
bat collection |
Plain Text |
|
|
bat collection |
PowerShell |
|
|
bat collection |
Private Key |
|
|
bat collection |
Protocol Buffer |
|
|
bat collection |
Protocol Buffer (TEXT) |
|
|
bat collection |
Puppet |
|
|
bat collection |
PureScript |
|
|
bat collection |
Python |
|
|
bat collection |
Python Console |
|
|
ubCode |
QML |
|
|
bat collection |
R |
|
|
bat collection |
R Console |
|
|
bat collection |
Racket |
|
|
bat collection |
Rd (R Documentation) |
|
|
bat collection |
Rego |
|
|
bat collection |
Regular Expression |
|
|
bat collection |
Requirements.txt |
|
|
bat collection |
resolv |
|
|
bat collection |
reStructuredText |
|
|
ubCode |
Robot Framework |
|
|
bat collection |
Ruby |
|
|
bat collection |
Ruby Haml |
|
|
bat collection |
Ruby on Rails |
|
|
bat collection |
Ruby Slim |
|
|
bat collection |
Rust |
|
|
bat collection |
Salt State (SLS) |
|
|
bat collection |
Sass |
|
|
bat collection |
Scala |
|
|
bat collection |
SCSS |
|
|
bat collection |
Semi-Colon Separated Values |
|
|
bat collection |
Separated Values |
|
|
bat collection |
Shell Session |
|
|
ubCode |
SML |
|
|
bat collection |
Solidity |
|
|
bat collection |
SQL |
|
|
bat collection |
SQL (Rails) |
|
|
bat collection |
SSH Config |
|
|
bat collection |
SSHD Config |
|
|
bat collection |
Strace |
|
|
bat collection |
Stylus |
|
|
bat collection |
Svelte |
|
|
bat collection |
Swift |
|
|
bat collection |
syslog |
|
|
bat collection |
SystemVerilog |
|
|
bat collection |
Tab Separated Values |
|
|
bat collection |
Tcl |
|
|
bat collection |
Terraform |
|
|
bat collection |
Textile |
|
|
bat collection |
Todo.txt |
|
|
bat collection |
TOML |
|
|
bat collection |
TypeScript |
|
|
bat collection |
TypeScriptReact |
|
|
bat collection |
Typst |
|
|
bat collection |
varlink |
|
|
bat collection |
Verilog |
|
|
bat collection |
VHDL |
|
|
bat collection |
VimHelp |
|
|
bat collection |
VimL |
|
|
bat collection |
Vue Component |
|
|
bat collection |
Vyper |
|
|
bat collection |
WGSL |
|
|
bat collection |
x86_64 Assembly |
|
|
bat collection |
XML |
|
|
bat collection |
YAML |
|
|
bat collection |
Zig |
|
|
bat collection |