# zig fmt: fix line comment detection · gitcafe/zig

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

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

Visibility: public

Requested revision: 5b9ea5dd1ec0467f759d51f080fec68b2788d909

Requested commit: 5b9ea5dd1ec0467f759d51f080fec68b2788d909

Commit: 5b9ea5dd1ec0467f759d51f080fec68b2788d909

Tree: 89f6d2787cb1c60a4c823fabb505f3cdbbe195dc

Author: Isaac Freund

Committer: Isaac Freund

## Message

```
zig fmt: fix line comment detection

Previously hasComment() would consider a string literal "//" to be a
line comment. Fix this by only searching the bytes between tokens.

```

## Parents

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

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