HushJot

Markdown code blocks. Three backticks.

Wrap a word in single backticks for inline code. For a block, put three backticks on the line above and the line below. Name the language after the opening backticks and apps that highlight code will colour it.

On the left, what you type. On the right, what you get. Every result here was rendered by HushJot itself.

Inline code and blocks

Inline code

Run `npm install` first.

Run npm install first.

Use it for commands, file names and values, anywhere inside a sentence.

A fenced code block

```
line one
line two
```
line one
line two

Everything between the fences is shown exactly as typed, including spaces and Markdown characters.

Syntax highlighting

```python
def greet(name):
    return f"Hello, {name}"
```
def greet(name):
    return f"Hello, {name}"

The word after the fence names the language: js, python, bash, json, sql… HushJot colours about 150 of them in the app.

Other ways, and backticks in code

Tildes work too

~~~
fenced with tildes
~~~
fenced with tildes

Handy when the code itself is full of backticks.

Indented code

A paragraph.

    four spaces in
    make a code block

A paragraph.

four spaces in
make a code block

The original Markdown way. It can’t name a language, so fences are better.

Backticks inside code

Type `` `code` `` for code.

````md
```js
console.log(1);
```
````

Type `code` for code.

```js
console.log(1);
```

Use more backticks on the outside than on the inside: two around inline code that holds one, four around a block that holds three.

Questions

Code blocks, answered.

How do I make a code block in Markdown?
Put three backticks (```) on a line before the code and three on a line after it. Add a language name after the first three, such as ```js, for syntax highlighting.
How do I write inline code?
Wrap it in single backticks: `npm install`.
How do I show backticks inside inline code?
Wrap it in more backticks than it contains, with a space inside: `` `code` ``.
Which language names can I use?
The common ones work everywhere: js, ts, python, bash, json, html, css, sql, yaml. An app that doesn’t know a name shows the code without colours.

Write it, see it, keep it private.

HushJot is a Markdown notepad that opens instantly in your browser, with no account needed. Your notes are end-to-end encrypted.