mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
fmt: keep char literal, '
(#11060)
This commit is contained in:
parent
b95224aa20
commit
490dec222f
11 changed files with 18 additions and 14 deletions
|
@ -44,7 +44,7 @@ fn (mut r Repl) checks() bool {
|
|||
mut in_string := false
|
||||
was_indent := r.indent > 0
|
||||
for i := 0; i < r.line.len; i++ {
|
||||
if r.line[i] == `\'` && (i == 0 || r.line[i - 1] != `\\`) {
|
||||
if r.line[i] == `'` && (i == 0 || r.line[i - 1] != `\\`) {
|
||||
in_string = !in_string
|
||||
}
|
||||
if r.line[i] == `{` && !in_string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue