Skip to content

Commit b57d49b

Browse files
author
bors-servo
authored
Auto merge of #400 - mbrubeck:doc, r=jdm
Make links in docs work with commonmark Fixes formatting with the new pulldown-cmark Markdown parser (rust-lang/rust#44229). <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/400) <!-- Reviewable:end -->
2 parents 8950062 + 8710886 commit b57d49b

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/host.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl<'a> Host<&'a str> {
137137
impl Host<String> {
138138
/// Parse a host: either an IPv6 address in [] square brackets, or a domain.
139139
///
140-
/// https://url.spec.whatwg.org/#host-parsing
140+
/// <https://url.spec.whatwg.org/#host-parsing>
141141
pub fn parse(input: &str) -> Result<Self, ParseError> {
142142
if input.starts_with('[') {
143143
if !input.ends_with(']') {
@@ -309,7 +309,7 @@ fn longest_zero_sequence(pieces: &[u16; 8]) -> (isize, isize) {
309309
}
310310
}
311311

312-
/// https://url.spec.whatwg.org/#ipv4-number-parser
312+
/// <https://url.spec.whatwg.org/#ipv4-number-parser>
313313
fn parse_ipv4number(mut input: &str) -> Result<u32, ()> {
314314
let mut r = 10;
315315
if input.starts_with("0x") || input.starts_with("0X") {
@@ -331,7 +331,7 @@ fn parse_ipv4number(mut input: &str) -> Result<u32, ()> {
331331
}
332332
}
333333

334-
/// https://url.spec.whatwg.org/#concept-ipv4-parser
334+
/// <https://url.spec.whatwg.org/#concept-ipv4-parser>
335335
fn parse_ipv4addr(input: &str) -> ParseResult<Option<Ipv4Addr>> {
336336
if input.is_empty() {
337337
return Ok(None)
@@ -368,7 +368,7 @@ fn parse_ipv4addr(input: &str) -> ParseResult<Option<Ipv4Addr>> {
368368
Ok(Some(Ipv4Addr::from(ipv4)))
369369
}
370370

371-
/// https://url.spec.whatwg.org/#concept-ipv6-parser
371+
/// <https://url.spec.whatwg.org/#concept-ipv6-parser>
372372
fn parse_ipv6addr(input: &str) -> ParseResult<Ipv6Addr> {
373373
let input = input.as_bytes();
374374
let len = input.len();

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ impl Url {
521521
Ok(())
522522
}
523523

524-
/// Return the origin of this URL (https://url.spec.whatwg.org/#origin)
524+
/// Return the origin of this URL (<https://url.spec.whatwg.org/#origin>)
525525
///
526526
/// Note: this returns an opaque origin for `file:` URLs, which causes
527527
/// `url.origin() != url.origin()`.

src/origin.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub fn url_origin(url: &Url) -> Origin {
4949
/// - If the scheme is anything else, the origin is opaque, meaning
5050
/// the URL does not have the same origin as any other URL.
5151
///
52-
/// For more information see https://url.spec.whatwg.org/#origin
52+
/// For more information see <https://url.spec.whatwg.org/#origin>
5353
#[derive(PartialEq, Eq, Hash, Clone, Debug)]
5454
pub enum Origin {
5555
/// A globally unique identifier
@@ -86,7 +86,7 @@ impl Origin {
8686
matches!(*self, Origin::Tuple(..))
8787
}
8888

89-
/// https://html.spec.whatwg.org/multipage/#ascii-serialisation-of-an-origin
89+
/// <https://html.spec.whatwg.org/multipage/#ascii-serialisation-of-an-origin>
9090
pub fn ascii_serialization(&self) -> String {
9191
match *self {
9292
Origin::Opaque(_) => "null".to_owned(),
@@ -100,7 +100,7 @@ impl Origin {
100100
}
101101
}
102102

103-
/// https://html.spec.whatwg.org/multipage/#unicode-serialisation-of-an-origin
103+
/// <https://html.spec.whatwg.org/multipage/#unicode-serialisation-of-an-origin>
104104
pub fn unicode_serialization(&self) -> String {
105105
match *self {
106106
Origin::Opaque(_) => "null".to_owned(),

0 commit comments

Comments
 (0)