Writing
Code blocks and languages
Fenced code blocks are highlighted in Write and Design, and keep their colors in HTML export.
Fenced blocks
```swift
func greet() -> String {
"Hello"
}
```
Language tag
Set the language after the opening backticks. Pinery supports 70+ languages, including:
ada, apache, bash, c, clojure, clojure-repl, cmake, coffeescript, cpp, crystal, csharp, css, d, dart, diff, django, dns, dockerfile, elixir, elm, erb, erlang, fsharp, go, gradle, graphql, groovy, haml, handlebars, haskell, http, ini, java, javascript, json, julia, kotlin, less, lua, makefile, markdown, matlab, nginx, nim, node-repl, objectivec, ocaml, perl, php, plaintext, powershell, properties, protobuf, python, python-repl, r, ruby, rust, scala, scss, shell, sql, swift, typescript, vbnet, vbscript, verilog, vim, wasm, xml, yaml.
If you omit the language, Pinery tries to auto-detect it.
Mermaid is special
Blocks tagged mermaid are rendered as diagrams, not highlighted code. See Mermaid.
Editing comfort
Auto-correction is disabled inside code blocks so typing symbols is not “fixed” for you.