1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

net.html: do not inject <text> tags for text that contains only newlines and spaces

This commit is contained in:
Delyan Angelov 2023-03-30 23:02:57 +03:00
parent 822acd78cb
commit 57aa4def62
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -71,7 +71,7 @@ fn (mut parser Parser) verify_end_comment(remove bool) bool {
fn blank_string(data string) bool { fn blank_string(data string) bool {
mut count := 0 mut count := 0
for chr in data { for chr in data {
if chr == 9 || chr == 32 { if chr == 10 || chr == 9 || chr == 32 {
count++ count++
} }
} }