net.html: use `-d debug_html` instead of `-g`, prevent undesired output, while debugging user programs (#14521)
ci/woodpecker/push/vc Pipeline was successful Details
ci/woodpecker/push/docker Pipeline was successful Details
ci/woodpecker/push/arch Pipeline was successful Details

kahsa 2022-05-25 17:23:56 +09:00 committed by Jef Roosens
parent f9515f7515
commit 585cb9ec2b
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
2 changed files with 8 additions and 11 deletions

View File

@ -21,14 +21,12 @@ mut:
debug_file os.File
}
[if debug]
[if debug_html ?]
fn (mut dom DocumentObjectModel) print_debug(data string) {
$if debug {
if data.len > 0 {
dom.debug_file.writeln(data) or { eprintln(err) }
}
}
}
[inline]
fn is_close_tag(tag &Tag) bool {

View File

@ -49,14 +49,12 @@ fn (parser Parser) builder_str() string {
return parser.lexical_attributes.lexeme_builder.after(0)
}
[if debug]
[if debug_html ?]
fn (mut parser Parser) print_debug(data string) {
$if debug {
if data.len > 0 {
parser.debug_file.writeln(data) or { panic(err) }
}
}
}
fn (mut parser Parser) verify_end_comment(remove bool) bool {
lexeme := parser.builder_str()
@ -155,7 +153,8 @@ pub fn (mut parser Parser) split_parse(data string) {
parser.lexical_attributes.current_tag.attributes[lattr] = nval
parser.lexical_attributes.current_tag.last_attribute = ''
} else {
parser.lexical_attributes.current_tag.attributes[temp_lexeme.to_lower()] = '' // parser.print_debug(temp_lexeme)
parser.lexical_attributes.current_tag.attributes[temp_lexeme.to_lower()] = ''
// parser.print_debug(temp_lexeme)
}
parser.lexical_attributes.lexeme_builder.go_back_to(0)
} else {