Code & changes / Source excerpts
Code
Present SQL, signatures, and source excerpts clearly, including gaps in what is known.
Basic usage
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
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 / attribute | Purpose |
|---|---|
pre.code / .code-block | The code itself and an optional wrapper for copy controls. |
.tok-kw / .tok-str / .tok-num / .tok-com | Keywords, strings, numbers, and comments. |
.tok-var / .tok-id | Variables and identifiers. |
.code-scroll / .code-lead | Preserve line structure, or emphasize a lead statement. |
.hole | A 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.