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

net.html: use or {} in .writeln() method calls (fix #8942) (#8953)

This commit is contained in:
StunxFS
2021-02-25 08:24:30 -04:00
committed by GitHub
parent 1a8e502e2c
commit 2e381f427a
5 changed files with 31 additions and 44 deletions

View File

@ -34,7 +34,7 @@ fn test_giant_string() {
fn test_script_tag() {
mut parser := Parser{}
script_content := "\nvar googletag = googletag || {};\ngoogletag.cmd = googletag.cmd || [];if(3 > 5) {console.log(\'Birl\');}\n"
script_content := "\nvar googletag = googletag || {};\ngoogletag.cmd = googletag.cmd || [];if(3 > 5) {console.log('Birl');}\n"
temp_html := '<html><body><script>$script_content</script></body></html>'
parser.parse_html(temp_html)
assert parser.tags[2].content.len == script_content.replace('\n', '').len