Code

Code needs to look like code. Mixed in with regular prose, a variable name or a file path is easy to misread as part of the sentence around it , a monospaced font and a distinct background fix that instantly. Zelares gives you two ways to format code depending on how much of it you're writing: inline code for a word or two inside a sentence, and code blocks for anything that spans multiple lines.

Inline code

Wrap a word or phrase in single backticks to format it as inline code. It's the right choice for short commands, variable names, file paths, and anything else that should read as literal text rather than prose.

Run `npm install` before starting the app.

Code blocks

Wrap block code in triple backticks on their own lines. Everything between the fences is preserved exactly as typed, indentation, blank lines, and all, which makes code blocks the right choice for snippets, config files, terminal output, or any example where spacing matters.

```javascript
function greet() {
  console.log("Hello world");
}
```

Syntax highlighting

Add a language name directly after the opening fence to color the block for that language, keywords, strings, and comments each get their own color, which makes longer snippets much faster to scan. Leave the language off and the block still renders in monospace, just without the coloring.

```python
def greet():
    print("Hello world")
```

Context menu support

In the Zelares editor, select text and choose Format, then Code from the context menu to toggle inline code without typing backticks yourself. To insert an empty fenced block at the cursor, use Insert, then Code Block instead.

For diagrams rendered from fenced code blocks, see Mermaid Diagrams. For the full set of insert and formatting actions, see Context Menu.