# zig fmt: remove trailing whitespace on doc comments · gitcafe/zig

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

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

Visibility: public

Requested revision: 5fafcc2b629e2ff00755b2bf45e903590f04aa9f

Requested commit: 5fafcc2b629e2ff00755b2bf45e903590f04aa9f

Commit: 5fafcc2b629e2ff00755b2bf45e903590f04aa9f

Tree: 143bde0c47f71678a3d7f340073f519f7c41b7d2

Author: Damien Firmenich

Committer: GitHub

## Message

```
zig fmt: remove trailing whitespace on doc comments

Fixes #11353

The renderer treats comments and doc comments differently since doc
comments are parsed into the Ast. This commit adds a check after getting
the text for the doc comment and trims whitespace at the end before
rendering.

The `a = 0,` in the test is here to avoid a ParseError while parsing the
test.
```

## Parents

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

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