mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-12 14:23:33 +00:00
Keep -vet happy
This commit is contained in:
@@ -300,17 +300,17 @@ escape_html :: proc(s: string, allocator := context.allocator, loc := #caller_lo
|
||||
|
||||
w := 0
|
||||
for c in b {
|
||||
s := ""
|
||||
x := ""
|
||||
switch c {
|
||||
case '&': s = "&"
|
||||
case '\'': s = "'"
|
||||
case '<': s = "<"
|
||||
case '>': s = ">"
|
||||
case '"': s = """
|
||||
case '&': x = "&"
|
||||
case '\'': x = "'"
|
||||
case '<': x = "<"
|
||||
case '>': x = ">"
|
||||
case '"': x = """
|
||||
}
|
||||
if s != "" {
|
||||
copy(t[w:], s)
|
||||
w += len(s)
|
||||
if x != "" {
|
||||
copy(t[w:], x)
|
||||
w += len(x)
|
||||
} else {
|
||||
t[w] = c
|
||||
w += 1
|
||||
|
||||
Reference in New Issue
Block a user