# docgen: make the name required in the Code node · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/ce6de2df826347feadb66d087c43c77b2891dc0b)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: ce6de2df826347feadb66d087c43c77b2891dc0b

Requested commit: ce6de2df826347feadb66d087c43c77b2891dc0b

Commit: ce6de2df826347feadb66d087c43c77b2891dc0b

Tree: 35d6e155d09c3a5f3947ef7b71e98819cfe78124

Author: Manlio Perillo

Committer: Veikka Tuominen

## Message

```
docgen: make the name required in the Code node

Update the genToc funtion to make the name required in the Code node,
and add an additional optional field for the expected error, to use with
test_err, test_safety and obj_err.

Update langref.html.in to ensure all code blocks have a name that

  - is unique, so that a doctest can be identified by it
  - is descriptive

For test, test_err and test_safefy, ensure that the doctest name starts
with "test_", excluding doctests in the "Zig Test" section and doctests
that are imported by other doctests.

Ensure that the indentation of code_begin and code_end blocks are
consistent.

Fix a typo in pointer_arthemtic.

```

## Parents

- [220020599cc11764eb9ed32025dd506f2affedda](https://git.cafe/gitcafe/zig/commit/220020599cc11764eb9ed32025dd506f2affedda?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/ce6de2df826347feadb66d087c43c77b2891dc0b?format=markdown)
