Skip to content

Commit

Permalink
scanner: fix indent error for line comment generated by vdoc (#18422)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyi98 committed Jun 13, 2023
1 parent f634f7b commit 126fbe8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion vlib/net/http/cookie_test.v
Expand Up @@ -416,7 +416,7 @@ const (
value: ','
raw: 'special-8=","'
}]
}
},
// TODO(bradfitz): users have reported seeing this in the
// wild, but do browsers handle it? RFC 6265 just says "don't
// do that" (section 3) and then never mentions header folding
Expand Down
2 changes: 1 addition & 1 deletion vlib/strconv/tables.v
Expand Up @@ -24,7 +24,7 @@ const (
u64(1e14),
u64(1e15),
u64(1e16),
u64(1e17)
u64(1e17),
// We only need to find the length of at most 17 digit numbers.
]

Expand Down
2 changes: 1 addition & 1 deletion vlib/v/fmt/tests/array_init_comment_ending_keep.vv
Expand Up @@ -11,7 +11,7 @@ const (
value: ','
raw: 'special-8=","'
}]
}
},
// (bradfitz): users have reported seeing this in the
// wild, but do browsers handle it? RFC 6265 just says "don't
// do that" (section 3) and then never mentions header folding
Expand Down
2 changes: 1 addition & 1 deletion vlib/v/scanner/scanner.v
Expand Up @@ -1053,7 +1053,7 @@ fn (mut s Scanner) text_scan() token.Token {
// that are on a separate line
comment = '\x01' + comment
}
return s.new_token(.comment, comment, comment.len + 2)
return s.new_token(.comment, comment, s.line_comment.len + 2)
}
// Skip the comment (return the next token)
continue
Expand Down

0 comments on commit 126fbe8

Please sign in to comment.