# zig fmt: allow and trim whitespace around zig fmt: \(off\|on\) · gitcafe/zig

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

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

Visibility: public

Requested revision: 3ad9cb8b473820ec5ea11d85aa72e8ddc83cfa03

Requested commit: 3ad9cb8b473820ec5ea11d85aa72e8ddc83cfa03

Commit: 3ad9cb8b473820ec5ea11d85aa72e8ddc83cfa03

Tree: c3400ebccf6fa1a3b8ccd34a0a98a0fb2338496e

Author: Isaac Freund

Committer: Isaac Freund

## Message

```
zig fmt: allow and trim whitespace around zig fmt: (off|on)

Currently `//  zig fmt: off` does not work as there are two spaces
after the `//` instead of one. This can cause confusion, so allow
arbitrary whitespace before the `zig fmt: (off|on)` in the comment but
trim this whitespace to the canonical single space in the output.

```

## Parents

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

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