Skip to main content

Syntax highlighting

The Syntax Highlighting plugin adds language-aware colour to fenced code blocks. The examples below show PHP, Python, and SQL output.

See Syntax highlighting for configuration and supported theme behavior.

PHP

/* This program prints Hello, world! */
echo 'Hello, world!';

Python

# This program prints Hello, world!
print('Hello, world!')

SQL

CREATE TABLE "topic" (
    "id" integer NOT NULL PRIMARY KEY,
    "forum_id" integer NOT NULL,
    "subject" varchar(255) NOT NULL
);
ALTER TABLE "topic"
ADD CONSTRAINT forum_id FOREIGN KEY ("forum_id")
REFERENCES "forum" ("id");