日本語

Code & changes / Source excerpts

Code

Present SQL, signatures, and source excerpts clearly, including gaps in what is known.

Basic usage

Preview
SELECT id, title
FROM posts
WHERE status = 'published'
HTML
<pre class="code"><code><span class="tok-kw">SELECT</span> id, title
<span class="tok-kw">FROM</span> posts
<span class="tok-kw">WHERE</span> status = <span class="tok-str">'published'</span></code></pre>

Representing an unresolved part

Preview
SELECT * FROM [unresolved: table]
HTML
<pre class="code"><code><span class="tok-kw">SELECT</span> * <span class="tok-kw">FROM</span> <span class="hole tone-danger" title="The table name is determined at runtime">[unresolved: table]</span></code></pre>

Classes & attributes

Class / attributePurpose
pre.code / .code-blockThe code itself and an optional wrapper for copy controls.
.tok-kw / .tok-str / .tok-num / .tok-comKeywords, strings, numbers, and comments.
.tok-var / .tok-idVariables and identifiers.
.code-scroll / .code-leadPreserve line structure, or emphasize a lead statement.
.holeA dashed mark for a part that could not be resolved.

Usage notes

Escape &, <, and > before generating HTML. Red is never a syntax color. Use code-scroll only when wrapping would misrepresent the structure.

Examples follow your system color scheme. Use ◐ in the header to try automatic, light, and dark themes.