[librsvg: 1/2] Change bare URL in doc comments to CommonMark hyperlinks
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/2] Change bare URL in doc comments to CommonMark hyperlinks
- Date: Wed, 3 Nov 2021 23:18:21 +0000 (UTC)
commit b55dd4133a892dae5bfff069906f1cb0cd89a950
Author: Michael Howell <michael notriddle com>
Date: Sat Oct 30 14:06:21 2021 -0700
Change bare URL in doc comments to CommonMark hyperlinks
This fixes the `rustdoc::bare_urls` lint, fixing the problem.
warning: this URL is not a hyperlink
--> src/c_api/sizing.rs:29:9
|
29 | /// See https://www.w3.org/TR/css-images-3/#sizing-terms for terminology and logic.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead:
`<https://www.w3.org/TR/css-images-3/#sizing-terms>`
|
= note: `#[warn(rustdoc::bare_urls)]` on by default
= note: bare URLs are not automatically turned into clickable links
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/625>
src/accept_language.rs | 2 +-
src/c_api/sizing.rs | 2 +-
src/href.rs | 2 +-
src/parsers.rs | 2 +-
src/surface_utils/srgb.rs | 2 +-
src/text.rs | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/accept_language.rs b/src/accept_language.rs
index 2b352db57..1a9819440 100644
--- a/src/accept_language.rs
+++ b/src/accept_language.rs
@@ -48,7 +48,7 @@ struct Item {
/// Stores a parsed version of an HTTP Accept-Language header.
///
-/// https://datatracker.ietf.org/doc/html/rfc7231#section-5.3.5
+/// <https://datatracker.ietf.org/doc/html/rfc7231#section-5.3.5>
#[derive(Clone, Debug, PartialEq)]
pub struct AcceptLanguage(Box<[Item]>);
diff --git a/src/c_api/sizing.rs b/src/c_api/sizing.rs
index adc22334c..b475d4281 100644
--- a/src/c_api/sizing.rs
+++ b/src/c_api/sizing.rs
@@ -26,7 +26,7 @@ use super::handle::CairoRectangleExt;
/// element. If these are not available, then the size must be computed
/// by actually measuring the geometries of elements in the document.
///
-/// See https://www.w3.org/TR/css-images-3/#sizing-terms for terminology and logic.
+/// See <https://www.w3.org/TR/css-images-3/#sizing-terms> for terminology and logic.
pub trait LegacySize {
fn legacy_document_size(&self) -> Result<(f64, f64), RenderingError> {
let (ink_r, _) = self.legacy_layer_geometry(None)?;
diff --git a/src/href.rs b/src/href.rs
index 2c830421c..fa41ed54b 100644
--- a/src/href.rs
+++ b/src/href.rs
@@ -2,7 +2,7 @@
//!
//! In SVG1.1, links to elements are done with the `xlink:href` attribute. However, SVG2
//! reduced this to just plain `href` with no namespace:
-//! https://svgwg.org/svg2-draft/linking.html#XLinkRefAttrs
+//! <https://svgwg.org/svg2-draft/linking.html#XLinkRefAttrs>
//!
//! If an element has both `xlink:href` and `href` attributes, the `href` overrides the
//! other. We implement that logic in this module.
diff --git a/src/parsers.rs b/src/parsers.rs
index 8230cb44d..98fd1e2b1 100644
--- a/src/parsers.rs
+++ b/src/parsers.rs
@@ -138,7 +138,7 @@ impl Parse for NumberOrPercentage {
impl Parse for i32 {
/// CSS integer
///
- /// https://www.w3.org/TR/SVG11/types.html#DataTypeInteger
+ /// <https://www.w3.org/TR/SVG11/types.html#DataTypeInteger>
fn parse<'i>(parser: &mut Parser<'i, '_>) -> Result<Self, ParseError<'i>> {
Ok(parser.expect_integer()?)
}
diff --git a/src/surface_utils/srgb.rs b/src/surface_utils/srgb.rs
index 0f6e110f7..c745d0b4e 100644
--- a/src/surface_utils/srgb.rs
+++ b/src/surface_utils/srgb.rs
@@ -1,6 +1,6 @@
//! Utility functions for dealing with sRGB colors.
//!
-//! The constant values in this module are taken from http://www.color.org/chardata/rgb/srgb.xalter
+//! The constant values in this module are taken from <http://www.color.org/chardata/rgb/srgb.xalter>
use crate::rect::IRect;
use crate::surface_utils::{
diff --git a/src/text.rs b/src/text.rs
index 09b7a8e9a..4e0387f2f 100644
--- a/src/text.rs
+++ b/src/text.rs
@@ -1073,7 +1073,7 @@ impl From<WritingMode> for pango::Gravity {
/// Constants with Unicode's directional formatting characters
///
-/// https://unicode.org/reports/tr9/#Directional_Formatting_Characters
+/// <https://unicode.org/reports/tr9/#Directional_Formatting_Characters>
mod directional_formatting_characters {
/// Left-to-Right Embedding
///
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]