mirror of
https://github.com/swc-project/swc.git
synced 2024-11-27 04:47:03 +03:00
fix(html/parser): Parse table including broken one (#4451)
This commit is contained in:
parent
a64ed37ef5
commit
6e60813367
@ -74,14 +74,9 @@ impl Default for InsertionMode {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
enum InsertionPosition {
|
||||
LastChild(RcNode),
|
||||
BeforeSibling(RcNode),
|
||||
TableFosterParenting {
|
||||
element: RcNode,
|
||||
prev_element: RcNode,
|
||||
},
|
||||
}
|
||||
|
||||
pub struct Parser<I>
|
||||
@ -1474,7 +1469,7 @@ where
|
||||
Token::StartTag { tag_name, .. } if tag_name == "script" => {
|
||||
let last_pos = self.input.last_pos()?;
|
||||
let adjusted_insertion_location =
|
||||
self.get_appropriate_place_for_inserting_node(None);
|
||||
self.get_appropriate_place_for_inserting_node(None)?;
|
||||
let node = Node::new(Data::Element(self.create_element_for_token(
|
||||
token_and_info.token.clone(),
|
||||
Span::new(token_and_info.span.lo, last_pos, Default::default()),
|
||||
@ -4013,7 +4008,7 @@ where
|
||||
//
|
||||
// Reprocess the current token.
|
||||
Token::StartTag { tag_name, .. } if tag_name == "col" => {
|
||||
self.open_elements_stack.clear_back_to_table_body_context();
|
||||
self.open_elements_stack.clear_back_to_table_context();
|
||||
self.insert_html_element(&mut TokenAndInfo {
|
||||
span: Default::default(),
|
||||
acknowledged: true,
|
||||
@ -4051,7 +4046,7 @@ where
|
||||
Token::StartTag { tag_name, .. }
|
||||
if matches!(tag_name.as_ref(), "td" | "th" | "tr") =>
|
||||
{
|
||||
self.open_elements_stack.clear_back_to_table_body_context();
|
||||
self.open_elements_stack.clear_back_to_table_context();
|
||||
self.insert_html_element(&mut TokenAndInfo {
|
||||
span: Default::default(),
|
||||
acknowledged: false,
|
||||
@ -4265,10 +4260,6 @@ where
|
||||
self.foster_parenting_enabled = saved_foster_parenting_state;
|
||||
}
|
||||
}
|
||||
// When the steps above require the UA to clear the stack back
|
||||
// to a table context, it means that the UA must, while the
|
||||
// current node is not a table, template, or html element, pop
|
||||
// elements from the stack of open elements.
|
||||
}
|
||||
// The "in table text" insertion mode
|
||||
InsertionMode::InTableText => {
|
||||
@ -4765,10 +4756,6 @@ where
|
||||
self.process_token_using_rules(token_and_info, InsertionMode::InTable)?;
|
||||
}
|
||||
}
|
||||
// When the steps above require the UA to clear the stack back
|
||||
// to a table body context, it means that the UA must, while the
|
||||
// current node is not a tbody, tfoot, thead, template, or html
|
||||
// element, pop elements from the stack of open elements.
|
||||
}
|
||||
// The "in row" insertion mode
|
||||
InsertionMode::InRow => {
|
||||
@ -4911,10 +4898,6 @@ where
|
||||
self.process_token_using_rules(token_and_info, InsertionMode::InTable)?;
|
||||
}
|
||||
}
|
||||
// When the steps above require the UA to clear the stack back
|
||||
// to a table row context, it means that the UA must, while the
|
||||
// current node is not a tr, template, or html element, pop
|
||||
// elements from the stack of open elements.
|
||||
}
|
||||
// The "in cell" insertion mode
|
||||
InsertionMode::InCell => {
|
||||
@ -6880,7 +6863,7 @@ where
|
||||
if self.is_fragment_case {
|
||||
// Fragment case
|
||||
|
||||
// node = self.context_element;
|
||||
node = self.context_element.as_ref();
|
||||
}
|
||||
}
|
||||
|
||||
@ -7152,27 +7135,204 @@ where
|
||||
false
|
||||
}
|
||||
|
||||
// Gets the appropriate place to insert the node.
|
||||
// While the parser is processing a token, it can enable or disable foster
|
||||
// parenting. This affects the following algorithm.
|
||||
//
|
||||
// The appropriate place for inserting a node, optionally using a particular
|
||||
// override target, is the position in an element returned by running the
|
||||
// following steps:
|
||||
//
|
||||
// 1. If there was an override target specified, then let target be the override
|
||||
// target.
|
||||
//
|
||||
// Otherwise, let target be the current node.
|
||||
//
|
||||
// 2. Determine the adjusted insertion location using the first matching steps
|
||||
// from the following list:
|
||||
//
|
||||
// If foster parenting is enabled and target is a table, tbody, tfoot, thead, or
|
||||
// tr element Foster parenting happens when content is misnested in tables.
|
||||
//
|
||||
// Run these substeps:
|
||||
//
|
||||
// 1. Let last template be the last template element in the stack of open
|
||||
// elements, if any.
|
||||
//
|
||||
// 2. Let last table be the last table element in the stack of open elements, if
|
||||
// any.
|
||||
//
|
||||
// 3. If there is a last template and either there is no last table, or there is
|
||||
// one, but last template is lower (more recently added) than last table in the
|
||||
// stack of open elements, then: let adjusted insertion location be inside last
|
||||
// template's template contents, after its last child (if any), and abort these
|
||||
// steps.
|
||||
//
|
||||
// 4. If there is no last table, then let adjusted insertion location be inside
|
||||
// the first element in the stack of open elements (the html element), after
|
||||
// its last child (if any), and abort these steps. (fragment case)
|
||||
//
|
||||
// 5. If last table has a parent node, then let adjusted insertion location be
|
||||
// inside last table's parent node, immediately before last table, and abort
|
||||
// these steps.
|
||||
//
|
||||
// 6. Let previous element be the element immediately above last table in the
|
||||
// stack of open elements.
|
||||
//
|
||||
// 7. Let adjusted insertion location be inside previous element, after its last
|
||||
// child (if any).
|
||||
//
|
||||
// These steps are involved in part because it's possible for elements, the
|
||||
// table element in this case in particular, to have been moved by a script
|
||||
// around in the DOM, or indeed removed from the DOM entirely, after the element
|
||||
// was inserted by the parser.
|
||||
//
|
||||
// Otherwise
|
||||
// Let adjusted insertion location be inside target, after its last child (if
|
||||
// any).
|
||||
//
|
||||
// 3. If the adjusted insertion location is inside a template element, let it
|
||||
// instead be inside the template element's template contents, after its last
|
||||
// child (if any).
|
||||
//
|
||||
// 4. Return the adjusted insertion location.
|
||||
fn get_appropriate_place_for_inserting_node(
|
||||
&mut self,
|
||||
override_target: Option<RcNode>,
|
||||
) -> InsertionPosition {
|
||||
// If there was an override target specified, then let target be the
|
||||
// override target. Otherwise, let target be the current node.
|
||||
// TODO avoid unwrap and improve foster and document
|
||||
let target = override_target
|
||||
.unwrap_or_else(|| self.open_elements_stack.items.last().unwrap().clone());
|
||||
) -> PResult<InsertionPosition> {
|
||||
// TODO avoid `unreachable` and return `Option` and improve error reporting
|
||||
// 1.
|
||||
let target = override_target.unwrap_or_else(|| {
|
||||
if let Some(last) = self.open_elements_stack.items.last() {
|
||||
last.clone()
|
||||
} else {
|
||||
unreachable!();
|
||||
}
|
||||
});
|
||||
|
||||
// NOTE: Foster parenting happens when content is misnested in tables.
|
||||
// let adjusted_insertion_location = if self.foster_parenting_enabled {
|
||||
// target
|
||||
// } else {
|
||||
// target
|
||||
// 2.
|
||||
let adjusted_insertion_location = if self.foster_parenting_enabled
|
||||
&& match &target.data {
|
||||
Data::Element(element)
|
||||
if matches!(
|
||||
element.tag_name.as_ref(),
|
||||
"table" | "tbody" | "tfoot" | "thead" | "tr"
|
||||
) =>
|
||||
{
|
||||
true
|
||||
}
|
||||
_ => false,
|
||||
} {
|
||||
// 2.1
|
||||
let mut last_template = None;
|
||||
let mut last_template_index = 0;
|
||||
|
||||
// 2.2
|
||||
let mut last_table = None;
|
||||
let mut last_table_index = 0;
|
||||
|
||||
for (i, node) in self.open_elements_stack.items.iter().enumerate().rev() {
|
||||
match &node.data {
|
||||
Data::Element(element)
|
||||
if &*element.tag_name == "template" && last_template.is_none() =>
|
||||
{
|
||||
last_template = Some(node);
|
||||
last_template_index = i;
|
||||
|
||||
if last_table.is_some() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
Data::Element(element)
|
||||
if &*element.tag_name == "table" && last_table.is_none() =>
|
||||
{
|
||||
last_table = Some(node);
|
||||
last_table_index = i;
|
||||
|
||||
if last_template.is_some() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
// 2.3
|
||||
if (last_table.is_none()
|
||||
|| (last_table.is_some() && last_template_index > last_table_index))
|
||||
&& last_template.is_some()
|
||||
{
|
||||
let last_template = if let Some(last_template) = last_template {
|
||||
// TODO use template `content`
|
||||
last_template.clone()
|
||||
} else {
|
||||
unreachable!();
|
||||
};
|
||||
|
||||
InsertionPosition::LastChild(last_template)
|
||||
}
|
||||
// 2.4
|
||||
// Fragment case
|
||||
else if last_table.is_none() && self.open_elements_stack.items.first().is_some() {
|
||||
let first = if let Some(first) = self.open_elements_stack.items.first() {
|
||||
first.clone()
|
||||
} else {
|
||||
unreachable!();
|
||||
};
|
||||
|
||||
InsertionPosition::LastChild(first)
|
||||
}
|
||||
// 2.5
|
||||
else if match last_table {
|
||||
Some(last_table) => {
|
||||
let parent = last_table.parent.take();
|
||||
let has_parent = parent.is_some();
|
||||
|
||||
last_table.parent.set(parent);
|
||||
|
||||
has_parent
|
||||
}
|
||||
_ => false,
|
||||
} {
|
||||
let sibling =
|
||||
if let Some(sibling) = self.open_elements_stack.items.get(last_table_index) {
|
||||
sibling.clone()
|
||||
} else {
|
||||
unreachable!()
|
||||
};
|
||||
|
||||
InsertionPosition::BeforeSibling(sibling)
|
||||
} else {
|
||||
// 2.6
|
||||
let previous_element = if let Some(previous_element) =
|
||||
self.open_elements_stack.items.get(last_table_index - 1)
|
||||
{
|
||||
previous_element.clone()
|
||||
} else {
|
||||
unreachable!()
|
||||
};
|
||||
|
||||
// 2.7
|
||||
InsertionPosition::LastChild(previous_element)
|
||||
}
|
||||
} else {
|
||||
InsertionPosition::LastChild(target)
|
||||
};
|
||||
|
||||
// 3.
|
||||
// TODO use template `content`
|
||||
// adjusted_insertion_location = match &adjusted_insertion_location {
|
||||
// InsertionPosition::LastChild(node) |
|
||||
// InsertionPosition::BeforeSibling(node) => { match &node.data
|
||||
// { Data::Element(element) if &*element.tag_name ==
|
||||
// "template" => { adjusted_insertion_location
|
||||
// },
|
||||
// _ => adjusted_insertion_location
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
|
||||
// let html_elem = self.html_elem();
|
||||
|
||||
InsertionPosition::LastChild(target)
|
||||
// 4.
|
||||
Ok(adjusted_insertion_location)
|
||||
}
|
||||
|
||||
// Inserts a comment node in to the document while processing a comment token.
|
||||
@ -7181,7 +7341,7 @@ where
|
||||
// If position was specified, then let the adjusted insertion location
|
||||
// be position. Otherwise, let adjusted insertion location be the
|
||||
// appropriate place for inserting a node.
|
||||
let adjusted_insertion_location = self.get_appropriate_place_for_inserting_node(None);
|
||||
let adjusted_insertion_location = self.get_appropriate_place_for_inserting_node(None)?;
|
||||
|
||||
// Create a Comment node whose data attribute is set to data and whose
|
||||
// node document is the same as that of the node in which the adjusted
|
||||
@ -7256,13 +7416,13 @@ where
|
||||
|
||||
// Let the adjusted insertion location be the appropriate place for
|
||||
// inserting a node.
|
||||
let adjusted_insertion_location = self.get_appropriate_place_for_inserting_node(None);
|
||||
let adjusted_insertion_location = self.get_appropriate_place_for_inserting_node(None)?;
|
||||
|
||||
// If the adjusted insertion location is in a Document node, then abort
|
||||
// these steps.
|
||||
// NOTE: The DOM will not let Document nodes have Text node children, so
|
||||
// they are dropped on the floor.
|
||||
// TODO fix me
|
||||
// Note: we don't use document in stack elements, so we can't have Document here
|
||||
|
||||
// If there is a Text node immediately before the adjusted insertion location,
|
||||
// then append data to that Text node's data. Otherwise, create
|
||||
@ -7306,9 +7466,6 @@ where
|
||||
// TODO improve me for another, not happens for comments right
|
||||
// now
|
||||
}
|
||||
InsertionPosition::TableFosterParenting { .. } => {
|
||||
// TODO improve me for another, but we don't support foster yet
|
||||
}
|
||||
}
|
||||
|
||||
// Otherwise, create a new Text node whose data is data and whose node document
|
||||
@ -7343,16 +7500,7 @@ where
|
||||
) -> PResult<RcNode> {
|
||||
// Let the adjusted insertion location be the appropriate place for
|
||||
// inserting a node.
|
||||
let adjusted_insertion_location = self.get_appropriate_place_for_inserting_node(None);
|
||||
let (_node1, _node2) = match adjusted_insertion_location {
|
||||
InsertionPosition::LastChild(ref p) | InsertionPosition::BeforeSibling(ref p) => {
|
||||
(p.clone(), None)
|
||||
}
|
||||
InsertionPosition::TableFosterParenting {
|
||||
ref element,
|
||||
ref prev_element,
|
||||
} => (element.clone(), Some(prev_element.clone())),
|
||||
};
|
||||
let adjusted_insertion_location = self.get_appropriate_place_for_inserting_node(None)?;
|
||||
|
||||
// Create an element for the token in the given namespace, with the
|
||||
// intended parent being the element in which the adjusted insertion
|
||||
@ -7403,8 +7551,7 @@ where
|
||||
.borrow()
|
||||
.iter()
|
||||
.enumerate()
|
||||
// TODO span?
|
||||
.find(|&(_, child)| Rc::ptr_eq(child, node))
|
||||
.find(|&(_, child)| is_same_node(child, node))
|
||||
{
|
||||
Some((i, _)) => i,
|
||||
None => {
|
||||
@ -7441,21 +7588,6 @@ where
|
||||
InsertionPosition::BeforeSibling(sibling) => {
|
||||
self.append_node_before_sibling(&sibling, node)
|
||||
}
|
||||
InsertionPosition::TableFosterParenting {
|
||||
element,
|
||||
prev_element,
|
||||
} => {
|
||||
let parent = element.parent.take();
|
||||
let has_parent = parent.is_some();
|
||||
|
||||
element.parent.set(parent);
|
||||
|
||||
if has_parent {
|
||||
self.append_node_before_sibling(&element, node);
|
||||
} else {
|
||||
self.append_node(&prev_element, node);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
18
crates/swc_html_parser/tests/fixture/tag/p/input.html
Normal file
18
crates/swc_html_parser/tests/fixture/tag/p/input.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test</p>
|
||||
<p>
|
||||
Test
|
||||
Test
|
||||
</p>
|
||||
<p>One
|
||||
<p>Two
|
||||
|
||||
<p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
|
||||
</body>
|
||||
</html>
|
373
crates/swc_html_parser/tests/fixture/tag/p/output.json
Normal file
373
crates/swc_html_parser/tests/fixture/tag/p/output.json
Normal file
@ -0,0 +1,373 @@
|
||||
{
|
||||
"type": "Document",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 229,
|
||||
"ctxt": 0
|
||||
},
|
||||
"mode": "no-quirks",
|
||||
"children": [
|
||||
{
|
||||
"type": "DocumentType",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 15,
|
||||
"ctxt": 0
|
||||
},
|
||||
"name": "html",
|
||||
"publicId": null,
|
||||
"systemId": null
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 16,
|
||||
"end": 222,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "html",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "Attribute",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 0,
|
||||
"ctxt": 0
|
||||
},
|
||||
"namespace": null,
|
||||
"prefix": null,
|
||||
"name": "lang",
|
||||
"value": "en"
|
||||
}
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 33,
|
||||
"end": 68,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "head",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 39,
|
||||
"end": 44,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n "
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 44,
|
||||
"end": 59,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "title",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 51,
|
||||
"end": 59,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "Document"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 67,
|
||||
"end": 68,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 75,
|
||||
"end": 76,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 76,
|
||||
"end": 222,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "body",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 82,
|
||||
"end": 83,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 83,
|
||||
"end": 90,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "p",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 86,
|
||||
"end": 90,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "Test"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 94,
|
||||
"end": 95,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 95,
|
||||
"end": 117,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "p",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 98,
|
||||
"end": 117,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n Test\n Test\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 121,
|
||||
"end": 122,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 122,
|
||||
"end": 129,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "p",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 125,
|
||||
"end": 129,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "One\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 129,
|
||||
"end": 137,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "p",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 132,
|
||||
"end": 137,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "Two\n\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 137,
|
||||
"end": 222,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "p",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 140,
|
||||
"end": 222,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "object",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 148,
|
||||
"end": 155,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "param",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 155,
|
||||
"end": 183,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "ins",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 160,
|
||||
"end": 183,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "map",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 165,
|
||||
"end": 183,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "a",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "Attribute",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 0,
|
||||
"ctxt": 0
|
||||
},
|
||||
"namespace": null,
|
||||
"prefix": null,
|
||||
"name": "href",
|
||||
"value": "/"
|
||||
}
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 177,
|
||||
"end": 183,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "Apples"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 212,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "p",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 212,
|
||||
"end": 222,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n\n\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
]
|
||||
}
|
494
crates/swc_html_parser/tests/fixture/tag/p/span.rust-debug
Normal file
494
crates/swc_html_parser/tests/fixture/tag/p/span.rust-debug
Normal file
@ -0,0 +1,494 @@
|
||||
|
||||
x Document
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:1:1]
|
||||
1 | ,-> <!doctype html>
|
||||
2 | | <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | | <p>Test</p>
|
||||
8 | | <p>
|
||||
9 | | Test
|
||||
10 | | Test
|
||||
11 | | </p>
|
||||
12 | | <p>One
|
||||
13 | | <p>Two
|
||||
14 | |
|
||||
15 | | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
16 | |
|
||||
17 | | </body>
|
||||
18 | `-> </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x DocumentType
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:2:1]
|
||||
2 | ,-> <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | | <p>Test</p>
|
||||
8 | | <p>
|
||||
9 | | Test
|
||||
10 | | Test
|
||||
11 | | </p>
|
||||
12 | | <p>One
|
||||
13 | | <p>Two
|
||||
14 | |
|
||||
15 | | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
16 | |
|
||||
17 | `-> </body>
|
||||
18 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:2:1]
|
||||
2 | ,-> <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | | <p>Test</p>
|
||||
8 | | <p>
|
||||
9 | | Test
|
||||
10 | | Test
|
||||
11 | | </p>
|
||||
12 | | <p>One
|
||||
13 | | <p>Two
|
||||
14 | |
|
||||
15 | | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
16 | |
|
||||
17 | `-> </body>
|
||||
18 | </html>
|
||||
`----
|
||||
|
||||
x Attribute
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:5:1]
|
||||
5 | </head>
|
||||
: ^
|
||||
6 | <body>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:5:1]
|
||||
5 | </head>
|
||||
: ^
|
||||
6 | <body>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | | <p>Test</p>
|
||||
8 | | <p>
|
||||
9 | | Test
|
||||
10 | | Test
|
||||
11 | | </p>
|
||||
12 | | <p>One
|
||||
13 | | <p>Two
|
||||
14 | |
|
||||
15 | | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
16 | |
|
||||
17 | `-> </body>
|
||||
18 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | | <p>Test</p>
|
||||
8 | | <p>
|
||||
9 | | Test
|
||||
10 | | Test
|
||||
11 | | </p>
|
||||
12 | | <p>One
|
||||
13 | | <p>Two
|
||||
14 | |
|
||||
15 | | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
16 | |
|
||||
17 | `-> </body>
|
||||
18 | </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:6:1]
|
||||
6 | <body>
|
||||
: ^
|
||||
7 | <p>Test</p>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:6:1]
|
||||
6 | <body>
|
||||
: ^
|
||||
7 | <p>Test</p>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:7:1]
|
||||
7 | <p>Test</p>
|
||||
: ^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:7:1]
|
||||
7 | <p>Test</p>
|
||||
: ^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:7:1]
|
||||
7 | <p>Test</p>
|
||||
: ^^^^
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:7:1]
|
||||
7 | <p>Test</p>
|
||||
: ^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:7:1]
|
||||
7 | <p>Test</p>
|
||||
: ^
|
||||
8 | <p>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:7:1]
|
||||
7 | <p>Test</p>
|
||||
: ^
|
||||
8 | <p>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:8:1]
|
||||
8 | ,-> <p>
|
||||
9 | | Test
|
||||
10 | `-> Test
|
||||
11 | </p>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:8:1]
|
||||
8 | ,-> <p>
|
||||
9 | | Test
|
||||
10 | `-> Test
|
||||
11 | </p>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:8:1]
|
||||
8 | ,-> <p>
|
||||
9 | | Test
|
||||
10 | `-> Test
|
||||
11 | </p>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:8:1]
|
||||
8 | ,-> <p>
|
||||
9 | | Test
|
||||
10 | `-> Test
|
||||
11 | </p>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:11:1]
|
||||
11 | </p>
|
||||
: ^
|
||||
12 | <p>One
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:11:1]
|
||||
11 | </p>
|
||||
: ^
|
||||
12 | <p>One
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:12:1]
|
||||
12 | <p>One
|
||||
: ^^^^^^^
|
||||
13 | <p>Two
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:12:1]
|
||||
12 | <p>One
|
||||
: ^^^^^^^
|
||||
13 | <p>Two
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:12:1]
|
||||
12 | <p>One
|
||||
: ^^^^
|
||||
13 | <p>Two
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:12:1]
|
||||
12 | <p>One
|
||||
: ^^^^
|
||||
13 | <p>Two
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:13:1]
|
||||
13 | ,-> <p>Two
|
||||
14 | `->
|
||||
15 | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:13:1]
|
||||
13 | ,-> <p>Two
|
||||
14 | `->
|
||||
15 | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:13:1]
|
||||
13 | ,-> <p>Two
|
||||
14 | `->
|
||||
15 | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:13:1]
|
||||
13 | ,-> <p>Two
|
||||
14 | `->
|
||||
15 | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | ,-> <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
16 | |
|
||||
17 | `-> </body>
|
||||
18 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | ,-> <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
16 | |
|
||||
17 | `-> </body>
|
||||
18 | </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | ,-> <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
16 | |
|
||||
17 | `-> </body>
|
||||
18 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | ,-> <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
16 | |
|
||||
17 | `-> </body>
|
||||
18 | </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
: ^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
: ^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
: ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
: ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
: ^^^^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
: ^^^^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
: ^^^^^^
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
: ^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:1:1]
|
||||
1 | ,-> <!doctype html>
|
||||
2 | | <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | | <p>Test</p>
|
||||
8 | | <p>
|
||||
9 | | Test
|
||||
10 | | Test
|
||||
11 | | </p>
|
||||
12 | | <p>One
|
||||
13 | | <p>Two
|
||||
14 | |
|
||||
15 | `-> <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:1:1]
|
||||
1 | ,-> <!doctype html>
|
||||
2 | | <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | | <p>Test</p>
|
||||
8 | | <p>
|
||||
9 | | Test
|
||||
10 | | Test
|
||||
11 | | </p>
|
||||
12 | | <p>One
|
||||
13 | | <p>Two
|
||||
14 | |
|
||||
15 | `-> <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | ,-> <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
16 | |
|
||||
17 | `-> </body>
|
||||
18 | </html>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/p/input.html:15:1]
|
||||
15 | ,-> <p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>
|
||||
16 | |
|
||||
17 | `-> </body>
|
||||
18 | </html>
|
||||
`----
|
@ -0,0 +1,16 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<tbody align="right">
|
||||
<tr>
|
||||
<td>Cell 1</td>
|
||||
<td>Cell 2</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,136 @@
|
||||
{
|
||||
"type": "Document",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 182,
|
||||
"ctxt": 0
|
||||
},
|
||||
"mode": "no-quirks",
|
||||
"children": [
|
||||
{
|
||||
"type": "DocumentType",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 15,
|
||||
"ctxt": 0
|
||||
},
|
||||
"name": "html",
|
||||
"publicId": null,
|
||||
"systemId": null
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 16,
|
||||
"end": 175,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "html",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "Attribute",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 0,
|
||||
"ctxt": 0
|
||||
},
|
||||
"namespace": null,
|
||||
"prefix": null,
|
||||
"name": "lang",
|
||||
"value": "en"
|
||||
}
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 33,
|
||||
"end": 68,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "head",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 39,
|
||||
"end": 44,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n "
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 44,
|
||||
"end": 59,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "title",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 51,
|
||||
"end": 59,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "Document"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 67,
|
||||
"end": 68,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 75,
|
||||
"end": 76,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 76,
|
||||
"end": 175,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "body",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 82,
|
||||
"end": 175,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n\n\n\n Cell 1\n Cell 2\n\n\n\n\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,214 @@
|
||||
|
||||
x Document
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:1:1]
|
||||
1 | ,-> <!doctype html>
|
||||
2 | | <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | |
|
||||
8 | | <tbody align="right">
|
||||
9 | | <tr>
|
||||
10 | | <td>Cell 1</td>
|
||||
11 | | <td>Cell 2</td>
|
||||
12 | | </tr>
|
||||
13 | | </tbody>
|
||||
14 | |
|
||||
15 | | </body>
|
||||
16 | `-> </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x DocumentType
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:2:1]
|
||||
2 | ,-> <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | |
|
||||
8 | | <tbody align="right">
|
||||
9 | | <tr>
|
||||
10 | | <td>Cell 1</td>
|
||||
11 | | <td>Cell 2</td>
|
||||
12 | | </tr>
|
||||
13 | | </tbody>
|
||||
14 | |
|
||||
15 | `-> </body>
|
||||
16 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:2:1]
|
||||
2 | ,-> <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | |
|
||||
8 | | <tbody align="right">
|
||||
9 | | <tr>
|
||||
10 | | <td>Cell 1</td>
|
||||
11 | | <td>Cell 2</td>
|
||||
12 | | </tr>
|
||||
13 | | </tbody>
|
||||
14 | |
|
||||
15 | `-> </body>
|
||||
16 | </html>
|
||||
`----
|
||||
|
||||
x Attribute
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:5:1]
|
||||
5 | </head>
|
||||
: ^
|
||||
6 | <body>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:5:1]
|
||||
5 | </head>
|
||||
: ^
|
||||
6 | <body>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | |
|
||||
8 | | <tbody align="right">
|
||||
9 | | <tr>
|
||||
10 | | <td>Cell 1</td>
|
||||
11 | | <td>Cell 2</td>
|
||||
12 | | </tr>
|
||||
13 | | </tbody>
|
||||
14 | |
|
||||
15 | `-> </body>
|
||||
16 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | |
|
||||
8 | | <tbody align="right">
|
||||
9 | | <tr>
|
||||
10 | | <td>Cell 1</td>
|
||||
11 | | <td>Cell 2</td>
|
||||
12 | | </tr>
|
||||
13 | | </tbody>
|
||||
14 | |
|
||||
15 | `-> </body>
|
||||
16 | </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | |
|
||||
8 | | <tbody align="right">
|
||||
9 | | <tr>
|
||||
10 | | <td>Cell 1</td>
|
||||
11 | | <td>Cell 2</td>
|
||||
12 | | </tr>
|
||||
13 | | </tbody>
|
||||
14 | |
|
||||
15 | `-> </body>
|
||||
16 | </html>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-2/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | |
|
||||
8 | | <tbody align="right">
|
||||
9 | | <tr>
|
||||
10 | | <td>Cell 1</td>
|
||||
11 | | <td>Cell 2</td>
|
||||
12 | | </tr>
|
||||
13 | | </tbody>
|
||||
14 | |
|
||||
15 | `-> </body>
|
||||
16 | </html>
|
||||
`----
|
@ -0,0 +1,19 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
Table
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,269 @@
|
||||
{
|
||||
"type": "Document",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 226,
|
||||
"ctxt": 0
|
||||
},
|
||||
"mode": "no-quirks",
|
||||
"children": [
|
||||
{
|
||||
"type": "DocumentType",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 15,
|
||||
"ctxt": 0
|
||||
},
|
||||
"name": "html",
|
||||
"publicId": null,
|
||||
"systemId": null
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 16,
|
||||
"end": 219,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "html",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "Attribute",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 0,
|
||||
"ctxt": 0
|
||||
},
|
||||
"namespace": null,
|
||||
"prefix": null,
|
||||
"name": "lang",
|
||||
"value": "en"
|
||||
}
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 33,
|
||||
"end": 68,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "head",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 39,
|
||||
"end": 44,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n "
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 44,
|
||||
"end": 59,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "title",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 51,
|
||||
"end": 59,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "Document"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 67,
|
||||
"end": 68,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 75,
|
||||
"end": 76,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 76,
|
||||
"end": 219,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "body",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 82,
|
||||
"end": 84,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n\n"
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 84,
|
||||
"end": 103,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "table",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 91,
|
||||
"end": 103,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n "
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 96,
|
||||
"end": 200,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "table",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 103,
|
||||
"end": 116,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n "
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 200,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "tbody",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 112,
|
||||
"end": 187,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "tr",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 116,
|
||||
"end": 133,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n "
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 129,
|
||||
"end": 168,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "td",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 133,
|
||||
"end": 168,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n Table\n "
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 173,
|
||||
"end": 187,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n "
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 187,
|
||||
"end": 200,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n "
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 200,
|
||||
"end": 219,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n\n\n\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,409 @@
|
||||
|
||||
x Document
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:1:1]
|
||||
1 | ,-> <!doctype html>
|
||||
2 | | <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | |
|
||||
8 | | <table>
|
||||
9 | | <table>
|
||||
10 | | <tr>
|
||||
11 | | <td>
|
||||
12 | | Table
|
||||
13 | | </td>
|
||||
14 | | </tr>
|
||||
15 | | </table>
|
||||
16 | | </table>
|
||||
17 | |
|
||||
18 | | </body>
|
||||
19 | `-> </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x DocumentType
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:2:1]
|
||||
2 | ,-> <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | |
|
||||
8 | | <table>
|
||||
9 | | <table>
|
||||
10 | | <tr>
|
||||
11 | | <td>
|
||||
12 | | Table
|
||||
13 | | </td>
|
||||
14 | | </tr>
|
||||
15 | | </table>
|
||||
16 | | </table>
|
||||
17 | |
|
||||
18 | `-> </body>
|
||||
19 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:2:1]
|
||||
2 | ,-> <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | |
|
||||
8 | | <table>
|
||||
9 | | <table>
|
||||
10 | | <tr>
|
||||
11 | | <td>
|
||||
12 | | Table
|
||||
13 | | </td>
|
||||
14 | | </tr>
|
||||
15 | | </table>
|
||||
16 | | </table>
|
||||
17 | |
|
||||
18 | `-> </body>
|
||||
19 | </html>
|
||||
`----
|
||||
|
||||
x Attribute
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:5:1]
|
||||
5 | </head>
|
||||
: ^
|
||||
6 | <body>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:5:1]
|
||||
5 | </head>
|
||||
: ^
|
||||
6 | <body>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | |
|
||||
8 | | <table>
|
||||
9 | | <table>
|
||||
10 | | <tr>
|
||||
11 | | <td>
|
||||
12 | | Table
|
||||
13 | | </td>
|
||||
14 | | </tr>
|
||||
15 | | </table>
|
||||
16 | | </table>
|
||||
17 | |
|
||||
18 | `-> </body>
|
||||
19 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | |
|
||||
8 | | <table>
|
||||
9 | | <table>
|
||||
10 | | <tr>
|
||||
11 | | <td>
|
||||
12 | | Table
|
||||
13 | | </td>
|
||||
14 | | </tr>
|
||||
15 | | </table>
|
||||
16 | | </table>
|
||||
17 | |
|
||||
18 | `-> </body>
|
||||
19 | </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | `->
|
||||
8 | <table>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | `->
|
||||
8 | <table>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:8:1]
|
||||
8 | ,-> <table>
|
||||
9 | `-> <table>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:8:1]
|
||||
8 | ,-> <table>
|
||||
9 | `-> <table>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:8:1]
|
||||
8 | ,-> <table>
|
||||
9 | `-> <table>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:8:1]
|
||||
8 | ,-> <table>
|
||||
9 | `-> <table>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:9:5]
|
||||
9 | ,-> <table>
|
||||
10 | | <tr>
|
||||
11 | | <td>
|
||||
12 | | Table
|
||||
13 | | </td>
|
||||
14 | | </tr>
|
||||
15 | `-> </table>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:9:5]
|
||||
9 | ,-> <table>
|
||||
10 | | <tr>
|
||||
11 | | <td>
|
||||
12 | | Table
|
||||
13 | | </td>
|
||||
14 | | </tr>
|
||||
15 | `-> </table>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:9:5]
|
||||
9 | ,-> <table>
|
||||
10 | `-> <tr>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:9:5]
|
||||
9 | ,-> <table>
|
||||
10 | `-> <tr>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:1:1]
|
||||
1 | ,-> <!doctype html>
|
||||
2 | | <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | |
|
||||
8 | | <table>
|
||||
9 | | <table>
|
||||
10 | | <tr>
|
||||
11 | | <td>
|
||||
12 | | Table
|
||||
13 | | </td>
|
||||
14 | | </tr>
|
||||
15 | `-> </table>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:1:1]
|
||||
1 | ,-> <!doctype html>
|
||||
2 | | <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | |
|
||||
8 | | <table>
|
||||
9 | | <table>
|
||||
10 | | <tr>
|
||||
11 | | <td>
|
||||
12 | | Table
|
||||
13 | | </td>
|
||||
14 | | </tr>
|
||||
15 | `-> </table>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:10:9]
|
||||
10 | ,-> <tr>
|
||||
11 | | <td>
|
||||
12 | | Table
|
||||
13 | | </td>
|
||||
14 | `-> </tr>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:10:9]
|
||||
10 | ,-> <tr>
|
||||
11 | | <td>
|
||||
12 | | Table
|
||||
13 | | </td>
|
||||
14 | `-> </tr>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:10:9]
|
||||
10 | ,-> <tr>
|
||||
11 | `-> <td>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:10:9]
|
||||
10 | ,-> <tr>
|
||||
11 | `-> <td>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:11:13]
|
||||
11 | ,-> <td>
|
||||
12 | | Table
|
||||
13 | `-> </td>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:11:13]
|
||||
11 | ,-> <td>
|
||||
12 | | Table
|
||||
13 | `-> </td>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:11:13]
|
||||
11 | ,-> <td>
|
||||
12 | | Table
|
||||
13 | `-> </td>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:11:13]
|
||||
11 | ,-> <td>
|
||||
12 | | Table
|
||||
13 | `-> </td>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:13:13]
|
||||
13 | ,-> </td>
|
||||
14 | `-> </tr>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:13:13]
|
||||
13 | ,-> </td>
|
||||
14 | `-> </tr>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:14:9]
|
||||
14 | ,-> </tr>
|
||||
15 | `-> </table>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:14:9]
|
||||
14 | ,-> </tr>
|
||||
15 | `-> </table>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:15:5]
|
||||
15 | ,-> </table>
|
||||
16 | | </table>
|
||||
17 | |
|
||||
18 | `-> </body>
|
||||
19 | </html>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-3/input.html:15:5]
|
||||
15 | ,-> </table>
|
||||
16 | | </table>
|
||||
17 | |
|
||||
18 | `-> </body>
|
||||
19 | </html>
|
||||
`----
|
@ -0,0 +1,16 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
Table
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,136 @@
|
||||
{
|
||||
"type": "Document",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 153,
|
||||
"ctxt": 0
|
||||
},
|
||||
"mode": "no-quirks",
|
||||
"children": [
|
||||
{
|
||||
"type": "DocumentType",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 15,
|
||||
"ctxt": 0
|
||||
},
|
||||
"name": "html",
|
||||
"publicId": null,
|
||||
"systemId": null
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 16,
|
||||
"end": 146,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "html",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "Attribute",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 0,
|
||||
"ctxt": 0
|
||||
},
|
||||
"namespace": null,
|
||||
"prefix": null,
|
||||
"name": "lang",
|
||||
"value": "en"
|
||||
}
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 33,
|
||||
"end": 68,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "head",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 39,
|
||||
"end": 44,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n "
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 44,
|
||||
"end": 59,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "title",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 51,
|
||||
"end": 59,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "Document"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 67,
|
||||
"end": 68,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 75,
|
||||
"end": 76,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 76,
|
||||
"end": 146,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "body",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 82,
|
||||
"end": 146,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n\n\n \n Table\n \n\n\n\n\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,214 @@
|
||||
|
||||
x Document
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:1:1]
|
||||
1 | ,-> <!doctype html>
|
||||
2 | | <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | |
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | Table
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | |
|
||||
15 | | </body>
|
||||
16 | `-> </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x DocumentType
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:2:1]
|
||||
2 | ,-> <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | |
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | Table
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | |
|
||||
15 | `-> </body>
|
||||
16 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:2:1]
|
||||
2 | ,-> <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | |
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | Table
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | |
|
||||
15 | `-> </body>
|
||||
16 | </html>
|
||||
`----
|
||||
|
||||
x Attribute
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:5:1]
|
||||
5 | </head>
|
||||
: ^
|
||||
6 | <body>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:5:1]
|
||||
5 | </head>
|
||||
: ^
|
||||
6 | <body>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | |
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | Table
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | |
|
||||
15 | `-> </body>
|
||||
16 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | |
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | Table
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | |
|
||||
15 | `-> </body>
|
||||
16 | </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | |
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | Table
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | |
|
||||
15 | `-> </body>
|
||||
16 | </html>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-4/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | |
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | Table
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | |
|
||||
15 | `-> </body>
|
||||
16 | </html>
|
||||
`----
|
@ -0,0 +1 @@
|
||||
<table><thead><input type="text"></thead></table>
|
@ -0,0 +1,105 @@
|
||||
{
|
||||
"type": "Document",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 49,
|
||||
"ctxt": 0
|
||||
},
|
||||
"mode": "no-quirks",
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 14,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "html",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 7,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "head",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 14,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "body",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"end": 33,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "input",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "Attribute",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 0,
|
||||
"ctxt": 0
|
||||
},
|
||||
"namespace": null,
|
||||
"prefix": null,
|
||||
"name": "type",
|
||||
"value": "text"
|
||||
}
|
||||
],
|
||||
"children": [],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 14,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "table",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 7,
|
||||
"end": 14,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "thead",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
|
||||
x Document
|
||||
,-[$DIR/tests/fixture/tag/table-broken-5/input.html:1:1]
|
||||
1 | <table><thead><input type="text"></thead></table>
|
||||
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-5/input.html:1:1]
|
||||
1 | <table><thead><input type="text"></thead></table>
|
||||
: ^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-5/input.html:1:1]
|
||||
1 | <table><thead><input type="text"></thead></table>
|
||||
: ^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-5/input.html:1:1]
|
||||
1 | <table><thead><input type="text"></thead></table>
|
||||
: ^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-5/input.html:1:1]
|
||||
1 | <table><thead><input type="text"></thead></table>
|
||||
: ^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-5/input.html:1:1]
|
||||
1 | <table><thead><input type="text"></thead></table>
|
||||
: ^^^^^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-5/input.html:1:1]
|
||||
1 | <table><thead><input type="text"></thead></table>
|
||||
: ^^^^^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Attribute
|
||||
,-[$DIR/tests/fixture/tag/table-broken-5/input.html:1:1]
|
||||
1 | <table><thead><input type="text"></thead></table>
|
||||
: ^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-5/input.html:1:1]
|
||||
1 | <table><thead><input type="text"></thead></table>
|
||||
: ^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-5/input.html:1:1]
|
||||
1 | <table><thead><input type="text"></thead></table>
|
||||
: ^^^^^^^
|
||||
`----
|
@ -0,0 +1,15 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,251 @@
|
||||
{
|
||||
"type": "Document",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 181,
|
||||
"ctxt": 0
|
||||
},
|
||||
"mode": "no-quirks",
|
||||
"children": [
|
||||
{
|
||||
"type": "DocumentType",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 15,
|
||||
"ctxt": 0
|
||||
},
|
||||
"name": "html",
|
||||
"publicId": null,
|
||||
"systemId": null
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 16,
|
||||
"end": 174,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "html",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "Attribute",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 0,
|
||||
"ctxt": 0
|
||||
},
|
||||
"namespace": null,
|
||||
"prefix": null,
|
||||
"name": "lang",
|
||||
"value": "en"
|
||||
}
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 33,
|
||||
"end": 68,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "head",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 39,
|
||||
"end": 44,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n "
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 44,
|
||||
"end": 59,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "title",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 51,
|
||||
"end": 59,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "Document"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 67,
|
||||
"end": 68,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 75,
|
||||
"end": 76,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 76,
|
||||
"end": 174,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "body",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 82,
|
||||
"end": 83,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 83,
|
||||
"end": 174,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "table",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 90,
|
||||
"end": 99,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n "
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 174,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "tbody",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 95,
|
||||
"end": 174,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "tr",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 99,
|
||||
"end": 112,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n "
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 108,
|
||||
"end": 174,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "td",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 112,
|
||||
"end": 125,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n "
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 125,
|
||||
"end": 165,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "table",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 132,
|
||||
"end": 165,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n \n \n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 165,
|
||||
"end": 174,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,385 @@
|
||||
|
||||
x Document
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:1:1]
|
||||
1 | ,-> <!doctype html>
|
||||
2 | | <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | | <table>
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | | </body>
|
||||
15 | `-> </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x DocumentType
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:2:1]
|
||||
2 | ,-> <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | | <table>
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | `-> </body>
|
||||
15 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:2:1]
|
||||
2 | ,-> <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | | <table>
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | `-> </body>
|
||||
15 | </html>
|
||||
`----
|
||||
|
||||
x Attribute
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:5:1]
|
||||
5 | </head>
|
||||
: ^
|
||||
6 | <body>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:5:1]
|
||||
5 | </head>
|
||||
: ^
|
||||
6 | <body>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | | <table>
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | `-> </body>
|
||||
15 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | | <table>
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | `-> </body>
|
||||
15 | </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:6:1]
|
||||
6 | <body>
|
||||
: ^
|
||||
7 | <table>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:6:1]
|
||||
6 | <body>
|
||||
: ^
|
||||
7 | <table>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:7:1]
|
||||
7 | ,-> <table>
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | `-> </body>
|
||||
15 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:7:1]
|
||||
7 | ,-> <table>
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | `-> </body>
|
||||
15 | </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:7:1]
|
||||
7 | ,-> <table>
|
||||
8 | `-> <tr>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:7:1]
|
||||
7 | ,-> <table>
|
||||
8 | `-> <tr>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:1:1]
|
||||
1 | ,-> <!doctype html>
|
||||
2 | | <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | | <table>
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | `-> </body>
|
||||
15 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:1:1]
|
||||
1 | ,-> <!doctype html>
|
||||
2 | | <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | | <table>
|
||||
8 | | <tr>
|
||||
9 | | <td>
|
||||
10 | | <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | `-> </body>
|
||||
15 | </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:8:5]
|
||||
8 | ,-> <tr>
|
||||
9 | | <td>
|
||||
10 | | <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | `-> </body>
|
||||
15 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:8:5]
|
||||
8 | ,-> <tr>
|
||||
9 | | <td>
|
||||
10 | | <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | `-> </body>
|
||||
15 | </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:8:5]
|
||||
8 | ,-> <tr>
|
||||
9 | `-> <td>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:8:5]
|
||||
8 | ,-> <tr>
|
||||
9 | `-> <td>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:9:9]
|
||||
9 | ,-> <td>
|
||||
10 | | <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | `-> </body>
|
||||
15 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:9:9]
|
||||
9 | ,-> <td>
|
||||
10 | | <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | | </table>
|
||||
14 | `-> </body>
|
||||
15 | </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:9:9]
|
||||
9 | ,-> <td>
|
||||
10 | `-> <table>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:9:9]
|
||||
9 | ,-> <td>
|
||||
10 | `-> <table>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:10:13]
|
||||
10 | ,-> <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | `-> </table>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:10:13]
|
||||
10 | ,-> <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | `-> </table>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:10:13]
|
||||
10 | ,-> <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | `-> </table>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:10:13]
|
||||
10 | ,-> <table>
|
||||
11 | | </td>
|
||||
12 | | </tr>
|
||||
13 | `-> </table>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:13:1]
|
||||
13 | ,-> </table>
|
||||
14 | `-> </body>
|
||||
15 | </html>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken-6/input.html:13:1]
|
||||
13 | ,-> </table>
|
||||
14 | `-> </body>
|
||||
15 | </html>
|
||||
`----
|
@ -0,0 +1,11 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table><h1>test</h1></table>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,181 @@
|
||||
{
|
||||
"type": "Document",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 129,
|
||||
"ctxt": 0
|
||||
},
|
||||
"mode": "no-quirks",
|
||||
"children": [
|
||||
{
|
||||
"type": "DocumentType",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 15,
|
||||
"ctxt": 0
|
||||
},
|
||||
"name": "html",
|
||||
"publicId": null,
|
||||
"systemId": null
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 16,
|
||||
"end": 122,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "html",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "Attribute",
|
||||
"span": {
|
||||
"start": 0,
|
||||
"end": 0,
|
||||
"ctxt": 0
|
||||
},
|
||||
"namespace": null,
|
||||
"prefix": null,
|
||||
"name": "lang",
|
||||
"value": "en"
|
||||
}
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 33,
|
||||
"end": 68,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "head",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 39,
|
||||
"end": 44,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n "
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 44,
|
||||
"end": 59,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "title",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 51,
|
||||
"end": 59,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "Document"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 67,
|
||||
"end": 68,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 75,
|
||||
"end": 76,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n"
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 76,
|
||||
"end": 122,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "body",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 82,
|
||||
"end": 84,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n\n"
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 91,
|
||||
"end": 99,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "h1",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 95,
|
||||
"end": 99,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "test"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Element",
|
||||
"span": {
|
||||
"start": 84,
|
||||
"end": 91,
|
||||
"ctxt": 0
|
||||
},
|
||||
"tagName": "table",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"attributes": [],
|
||||
"children": [],
|
||||
"content": null
|
||||
},
|
||||
{
|
||||
"type": "Text",
|
||||
"span": {
|
||||
"start": 112,
|
||||
"end": 122,
|
||||
"ctxt": 0
|
||||
},
|
||||
"value": "\n\n\n"
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
],
|
||||
"content": null
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,225 @@
|
||||
|
||||
x Document
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:1:1]
|
||||
1 | ,-> <!doctype html>
|
||||
2 | | <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | |
|
||||
8 | | <table><h1>test</h1></table>
|
||||
9 | |
|
||||
10 | | </body>
|
||||
11 | `-> </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x DocumentType
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:2:1]
|
||||
2 | ,-> <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | |
|
||||
8 | | <table><h1>test</h1></table>
|
||||
9 | |
|
||||
10 | `-> </body>
|
||||
11 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:2:1]
|
||||
2 | ,-> <html lang="en">
|
||||
3 | | <head>
|
||||
4 | | <title>Document</title>
|
||||
5 | | </head>
|
||||
6 | | <body>
|
||||
7 | |
|
||||
8 | | <table><h1>test</h1></table>
|
||||
9 | |
|
||||
10 | `-> </body>
|
||||
11 | </html>
|
||||
`----
|
||||
|
||||
x Attribute
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:1:1]
|
||||
1 | <!doctype html>
|
||||
: ^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:3:1]
|
||||
3 | ,-> <head>
|
||||
4 | `-> <title>Document</title>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:4:5]
|
||||
4 | <title>Document</title>
|
||||
: ^
|
||||
5 | </head>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:5:1]
|
||||
5 | </head>
|
||||
: ^
|
||||
6 | <body>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:5:1]
|
||||
5 | </head>
|
||||
: ^
|
||||
6 | <body>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | |
|
||||
8 | | <table><h1>test</h1></table>
|
||||
9 | |
|
||||
10 | `-> </body>
|
||||
11 | </html>
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | |
|
||||
8 | | <table><h1>test</h1></table>
|
||||
9 | |
|
||||
10 | `-> </body>
|
||||
11 | </html>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | `->
|
||||
8 | <table><h1>test</h1></table>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:6:1]
|
||||
6 | ,-> <body>
|
||||
7 | `->
|
||||
8 | <table><h1>test</h1></table>
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:8:1]
|
||||
8 | <table><h1>test</h1></table>
|
||||
: ^^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:8:1]
|
||||
8 | <table><h1>test</h1></table>
|
||||
: ^^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:8:1]
|
||||
8 | <table><h1>test</h1></table>
|
||||
: ^^^^
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:8:1]
|
||||
8 | <table><h1>test</h1></table>
|
||||
: ^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:8:1]
|
||||
8 | <table><h1>test</h1></table>
|
||||
: ^^^^^^^
|
||||
`----
|
||||
|
||||
x Element
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:8:1]
|
||||
8 | <table><h1>test</h1></table>
|
||||
: ^^^^^^^
|
||||
`----
|
||||
|
||||
x Child
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:8:1]
|
||||
8 | ,-> <table><h1>test</h1></table>
|
||||
9 | |
|
||||
10 | `-> </body>
|
||||
11 | </html>
|
||||
`----
|
||||
|
||||
x Text
|
||||
,-[$DIR/tests/fixture/tag/table-broken/input.html:8:1]
|
||||
8 | ,-> <table><h1>test</h1></table>
|
||||
9 | |
|
||||
10 | `-> </body>
|
||||
11 | </html>
|
||||
`----
|
@ -45,5 +45,53 @@
|
||||
<td>Will eat till he explodes</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Student ID</th>
|
||||
<th>Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th colspan="2">Computer Science</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3741255</td>
|
||||
<td>Jones, Martha</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4077830</td>
|
||||
<td>Pierce, Benjamin</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>5151701</td>
|
||||
<td>Kirk, James</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th colspan="2">Russian Literature</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3971244</td>
|
||||
<td>Nim, Victor</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th colspan="2">Astrophysics</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4100332</td>
|
||||
<td>Petrov, Alexandra</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8892377</td>
|
||||
<td>Toyota, Hiroko</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user