Skip to content

Commit e70f4d3

Browse files
committed
Fix WHATWG links
1 parent e8f7743 commit e70f4d3

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

STRUCTURE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ The module structure is also documented in the output produced by `cargo doc`, a
66

77
`src/driver.rs`: Provides the highest-level interfaces to the parser, i.e. "here's a string, give me a DOM"
88

9-
`src/tokenizer/`: The first stage of HTML parsing, corresponding to WHATWG's [section 12.2.4 "Tokenization"](https://html.spec.whatwg.org/multipage/syntax.html#tokenization)
9+
`src/tokenizer/`: The first stage of HTML parsing, corresponding to WHATWG's [section 12.2.5 "Tokenization"](https://html.spec.whatwg.org/multipage/parsing.html#tokenization)
1010

11-
`src/tree_builder/`: The second (and final) stage, corresponding to [section 12.2.5 "Tree Construction"](https://html.spec.whatwg.org/multipage/syntax.html#tree-construction)
11+
`src/tree_builder/`: The second (and final) stage, corresponding to [section 12.2.6 "Tree Construction"](https://html.spec.whatwg.org/multipage/parsing.html#tree-construction)
1212

13-
`src/serialize/`: Turning trees back into strings. Corresponds to [section 12.3 "Serialising HTML fragments"](https://html.spec.whatwg.org/multipage/syntax.html#serialising-html-fragments)
13+
`src/serialize/`: Turning trees back into strings. Corresponds to [section 12.3 "Serialising HTML fragments"](https://html.spec.whatwg.org/multipage/parsing.html#serialising-html-fragments)
1414

1515
`dom_sink/`: Types that html5ever can use to represent the DOM, if you do not provide your own DOM implementation.
1616

html5ever/src/tokenizer/interface.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub trait TokenSink {
103103
/// Used in the markup declaration open state. By default, this always
104104
/// returns false and thus all CDATA sections are tokenized as bogus
105105
/// comments.
106-
/// https://html.spec.whatwg.org/multipage/#markup-declaration-open-state
106+
/// https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state
107107
fn adjusted_current_node_present_but_not_in_html_namespace(&self) -> bool {
108108
false
109109
}

html5ever/src/tree_builder/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ impl<Handle, Sink> TreeBuilder<Handle, Sink>
208208
current_line: 1,
209209
};
210210

211-
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-html-fragments
211+
// https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments
212212
// 5. Let root be a new html element with no attributes.
213213
// 6. Append the element root to the Document node created above.
214214
// 7. Set up the parser's stack of open elements so that it contains just the single element root.
@@ -219,7 +219,7 @@ impl<Handle, Sink> TreeBuilder<Handle, Sink>
219219
tb
220220
}
221221

222-
// https://html.spec.whatwg.org/multipage/syntax.html#concept-frag-parse-context
222+
// https://html.spec.whatwg.org/multipage/parsing.html#concept-frag-parse-context
223223
// Step 4. Set the state of the HTML parser's tokenization stage as follows:
224224
pub fn tokenizer_state_for_context_elem(&self) -> tok_state::State {
225225
let elem = self.context_elem.as_ref().expect("no context element");
@@ -360,7 +360,7 @@ impl<Handle, Sink> TreeBuilder<Handle, Sink>
360360
self.context_elem.is_some()
361361
}
362362

363-
/// https://html.spec.whatwg.org/multipage/#appropriate-place-for-inserting-a-node
363+
/// https://html.spec.whatwg.org/multipage/parsing.html#appropriate-place-for-inserting-a-node
364364
fn appropriate_place_for_insertion(&mut self,
365365
override_target: Option<Handle>)
366366
-> InsertionPoint<Handle> {
@@ -1078,7 +1078,7 @@ impl<Handle, Sink> TreeBuilder<Handle, Sink>
10781078
}
10791079
}
10801080

1081-
// https://html.spec.whatwg.org/multipage/syntax.html#reset-the-insertion-mode-appropriately
1081+
// https://html.spec.whatwg.org/multipage/parsing.html#reset-the-insertion-mode-appropriately
10821082
fn reset_insertion_mode(&mut self) -> InsertionMode {
10831083
for (i, mut node) in self.open_elems.iter().enumerate().rev() {
10841084
let last = i == 0usize;
@@ -1163,7 +1163,7 @@ impl<Handle, Sink> TreeBuilder<Handle, Sink>
11631163
// FIXME: application cache selection algorithm
11641164
}
11651165

1166-
// https://html.spec.whatwg.org/multipage/#create-an-element-for-the-token
1166+
// https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token
11671167
fn insert_element(&mut self, push: PushFlag, ns: Namespace, name: LocalName, attrs: Vec<Attribute>)
11681168
-> Handle {
11691169
declare_tag_set!(form_associatable =

html5ever/src/tree_builder/tag_sets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub fn mathml_text_integration_point(p: ExpandedName) -> bool {
9292
expanded_name!(mathml "mtext"))
9393
}
9494

95-
/// https://html.spec.whatwg.org/multipage/#html-integration-point
95+
/// https://html.spec.whatwg.org/multipage/parsing.html#html-integration-point
9696
pub fn svg_html_integration_point(p: ExpandedName) -> bool {
9797
// annotation-xml are handle in another place
9898
matches!(p,

markup5ever/interface/tree_builder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ pub struct ElementFlags {
5454
/// A document fragment should be created, associated with the element,
5555
/// and returned in TreeSink::get_template_contents
5656
///
57-
/// https://html.spec.whatwg.org/multipage/#template-contents
57+
/// https://html.spec.whatwg.org/multipage/scripting.html#template-contents
5858
pub template: bool,
5959

6060
/// This boolean should be recorded with the element and returned
6161
/// in TreeSink::is_mathml_annotation_xml_integration_point
6262
///
63-
/// https://html.spec.whatwg.org/multipage/#html-integration-point
63+
/// https://html.spec.whatwg.org/multipage/parsing.html#html-integration-point
6464
pub mathml_annotation_xml_integration_point: bool,
6565

6666
_private: ()
@@ -123,7 +123,7 @@ pub trait TreeSink {
123123
/// an associated document fragment called the "template contents" should
124124
/// also be created. Later calls to self.get_template_contents() with that
125125
/// given element return it.
126-
/// https://html.spec.whatwg.org/multipage/#htmltemplateelement
126+
/// https://html.spec.whatwg.org/multipage/scripting.html#the-template-element
127127
fn create_element(&mut self, name: QualName, attrs: Vec<Attribute>, flags: ElementFlags)
128128
-> Self::Handle;
129129

markup5ever/rcdom.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ pub enum NodeData {
5959
attrs: RefCell<Vec<Attribute>>,
6060

6161
/// For HTML <template> elements, the template contents
62-
/// https://html.spec.whatwg.org/multipage/#template-contents
62+
/// https://html.spec.whatwg.org/multipage/scripting.html#template-contents
6363
template_contents: Option<Handle>,
6464

65-
/// https://html.spec.whatwg.org/multipage/#html-integration-point
65+
/// https://html.spec.whatwg.org/multipage/parsing.html#html-integration-point
6666
mathml_annotation_xml_integration_point: bool,
6767
},
6868

0 commit comments

Comments
 (0)