Skip to content

Commit af8547a

Browse files
committed
readme: use appropriate heading levels
Use h1 for the title, h2 for sections, h3 for subsections, etc.
1 parent 5b1bd06 commit af8547a

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![Build Status](https://img.shields.io/endpoint?url=https%3A%2F%2Fci.ocamllabs.io%2Fbadge%2Frealworldocaml%2Fmdx%2Fmain&logo=ocaml)](https://ci.ocamllabs.io/github/realworldocaml/mdx)
22

3-
## MDX
3+
# MDX
44

55
MDX allows to execute code blocks inside markdown and mli/mld documentation
66
to help keeping them up to date.
@@ -18,7 +18,7 @@ $ opam install mdx
1818
If you want to contribute to the project, please see the
1919
[CONTRIBUTING.md](CONTRIBUTING.md).
2020

21-
### Basic Usage
21+
## Basic Usage
2222

2323
You can use MDX with your Markdown or `.ml{i,d}` documentation, which ensures
2424
code in multi-line or verbatim code blocks is correct.
@@ -123,9 +123,9 @@ Dune only checks markdown files with `mdx`. E.g.,
123123
(files :standard *.mli))
124124
```
125125

126-
### Supported Extensions
126+
## Supported Extensions
127127

128-
#### Labels
128+
### Labels
129129

130130
The blocks can be parameterized by `mdx`-specific labels, that
131131
will change the way `mdx` interprets the block.
@@ -160,7 +160,7 @@ The possible labels are:
160160
- `set-VAR=VALUE` -- set an environment variable
161161
- `unset-VAR` -- unset an environment variable
162162

163-
#### Shell Scripts
163+
### Shell Scripts
164164

165165
`ocaml-mdx` interprets shell scripts inside `sh` code blocks as cram-like tests. The
166166
syntax is the following:
@@ -211,7 +211,7 @@ MDX will also consider exit codes when the syntax `[<exit code>]`is used:
211211
Note that nothing will be displayed when the exit code is 0 (e.g. in case
212212
of success).
213213

214-
#### OCaml Code
214+
### OCaml Code
215215

216216
MDX interprets OCaml fragments. It understands _normal_ code fragments and
217217
_toplevel_ code fragments (starting with a `#` sign and optionally ending with
@@ -233,7 +233,7 @@ Here is an examples of toplevel OCaml code:
233233
42
234234
```
235235

236-
### File sync
236+
## File sync
237237

238238
MDX is also capable of including content from files in fenced code blocks
239239
using the label `file`. OCaml files can be sliced using named blocks:
@@ -258,9 +258,9 @@ Non-OCaml files can also be read and included in a block:
258258
```
259259
However, part splitting is only supported for OCaml files.
260260

261-
### Tests
261+
## Tests
262262

263-
#### Cram Tests
263+
### Cram Tests
264264

265265
Cram tests can be executed and checked with `ocaml-mdx test <file.md>`.
266266

@@ -274,7 +274,7 @@ Cram tests can be executed and checked with `ocaml-mdx test <file.md>`.
274274
If the output is not consistent with what is expected,
275275
`<file.md>.corrected` is generated.
276276

277-
#### OCaml
277+
### OCaml
278278

279279
To execute OCaml code and toplevel fragments, uses `ocaml-mdx test <file.md>`.
280280

@@ -286,9 +286,9 @@ To execute OCaml code and toplevel fragments, uses `ocaml-mdx test <file.md>`.
286286
If the output is not consistent with what is expected
287287
`<file.md>.corrected` is generated.
288288

289-
#### Non-deterministic Tests
289+
### Non-deterministic Tests
290290

291-
**Non-deterministic Outputs**
291+
#### Non-deterministic Outputs
292292

293293
`ocaml-mdx test` supports non-deterministic outputs:
294294

@@ -303,7 +303,7 @@ generate `<file>.corrected` if the new output differs from the one
303303
described in the file. Use `ocaml-mdx test --non-deterministic <file>` to come
304304
back to the default behaviour.
305305

306-
**Non-deterministic Commands**
306+
#### Non-deterministic Commands
307307

308308
`ocaml-mdx test` supports non-deterministic commands:
309309

@@ -322,7 +322,7 @@ non-deterministic blocks. This is useful when not calling MDX directly but
322322
through other commands like `dune` or Makefiles etc. Use
323323
`MDX_RUN_NON_DETERMINISTIC=1 ocaml-mdx test` in this case.
324324

325-
#### Named execution environments (since mdx 1.1.0)
325+
### Named execution environments (since mdx 1.1.0)
326326

327327
Separate environments can be defined for blocks:
328328

@@ -359,7 +359,7 @@ We can retrieve the value of `x` in environment `e1`:
359359
- : int -> int = <fun>
360360
```
361361

362-
#### Matching on the OCaml version (since mdx 1.2.0)
362+
### Matching on the OCaml version (since mdx 1.2.0)
363363

364364
Blocks can be processed or ignored depending on the current version of OCaml.
365365

@@ -390,7 +390,7 @@ The version number can be of the following forms:
390390
- `X.Y`
391391
- `X.Y.Z`
392392

393-
#### Matching based on the `os_type` (since mdx 2.4.0)
393+
### Matching based on the `os_type` (since mdx 2.4.0)
394394

395395
Block can be processed or ignored depending on the current
396396
[`os_type`](https://v2.ocaml.org/api/Sys.html#VALos_type).
@@ -417,7 +417,7 @@ Windows or not:
417417
The `os_type` values should be written in ASCII and are compared case
418418
insensitively.
419419

420-
#### Environment variables declaration
420+
### Environment variables declaration
421421

422422
Environment variables can be declared at the beginning of a block:
423423

0 commit comments

Comments
 (0)