@@ -7758,7 +7758,7 @@ impl Machine {
|
||||
.value_to_str_like(self.machine_st.registers[1])
|
||||
{
|
||||
let document = scraper::Html::parse_document(&string.as_str());
|
||||
let result = self.html_node_to_term(document.tree.root());
|
||||
let result = self.html_node_to_term(document.tree.root().first_child().unwrap());
|
||||
|
||||
unify!(self.machine_st, self.machine_st.registers[2], result);
|
||||
} else {
|
||||
|
||||
5
tests-pl/issue2588.pl
Normal file
5
tests-pl/issue2588.pl
Normal file
@@ -0,0 +1,5 @@
|
||||
:- use_module(library(sgml)).
|
||||
|
||||
test :- load_html("<html><head><title>Hello!</title></head></html>", Es, []), write(Es).
|
||||
|
||||
:- initialization(test).
|
||||
@@ -12,6 +12,12 @@ fn call_0() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(miri, ignore = "unsupported operation when isolation is enabled")]
|
||||
fn issue2588_load_html() {
|
||||
load_module_test("tests-pl/issue2588.pl", "[element(html,[],[element(head,[],[element(title,[],[[H,e,l,l,o,!]])]),element(body,[],[])])]");
|
||||
}
|
||||
|
||||
// issue #2361
|
||||
#[serial]
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user