Skip to content

Tests

Testing the rendering of observablehq notebooks in markdown.

Options

Regular js code block

md
```js
const mol = 40 + 2;
```

Produces:

js
const mol1 = 40 + 2;

Executed code block

md
```js exec
mol = 40 + 2;
```

Produces:

mol = 40 + 2;

Executed code block with echo

md
```js exec echo
molSrcEcho = 40 + 2;
```

Produces:

molSrcEcho = 40 + 2;
js
molSrcEcho = 40 + 2;

Executed code block with hide

md
```js exec hide
molSrcHide = 40 + 2;
```

Produces:

WARNING

Both the code block and executed output is hidden but the result is still calculated.

Executed code block with echo and hide

md
```js exec echo hide
molSrcEchoHide = 40 + 2;
```

Produces:

js
molSrcEchoHide = 40 + 2;


aaa

a mol b

R2D2

a ${ mol } b
js

Test block

A

1 × 1

B

1 × 2

C

1 × 1

R2D2

a ${ Plot.rectY({length: 10000}, Plot.binX({y: "count"}, {x: d3.randomNormal()})).plot() } b
-->