mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: single line ternary return (#8605)
This commit is contained in:
@@ -353,11 +353,7 @@ fn html_highlight(code string, tb &table.Table) string {
|
||||
} else {
|
||||
tok.lit
|
||||
}
|
||||
return if typ in [.unone, .name] {
|
||||
lit
|
||||
} else {
|
||||
'<span class="token $typ">$lit</span>'
|
||||
}
|
||||
return if typ in [.unone, .name] { lit } else { '<span class="token $typ">$lit</span>' }
|
||||
}
|
||||
mut s := scanner.new_scanner(code, .parse_comments, &pref.Preferences{})
|
||||
mut tok := s.scan()
|
||||
|
||||
Reference in New Issue
Block a user