Skip to content

Commit 5315048

Browse files
authored
Merge pull request #684 from mbrubeck/doc
Fix formatting warnings with commonmark enabled
2 parents 1b5214e + 2659868 commit 5315048

File tree

13 files changed

+35
-29
lines changed

13 files changed

+35
-29
lines changed

src/bmp/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
//! A decoder and encoder for BMP (Windows Bitmap) images
44
//!
55
//! # Related Links
6-
//! * https://msdn.microsoft.com/en-us/library/windows/desktop/dd183375%28v=vs.85%29.aspx
7-
//! * https://en.wikipedia.org/wiki/BMP_file_format
6+
//! * <https://msdn.microsoft.com/en-us/library/windows/desktop/dd183375%28v=vs.85%29.aspx>
7+
//! * <https://en.wikipedia.org/wiki/BMP_file_format>
88
//!
99
1010
pub use self::encoder::BMPEncoder;

src/dynimage.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ impl DynamicImage {
296296
/// ```sigma``` is the amount to blur the image by.
297297
/// ```threshold``` is a control of how much to sharpen.
298298
///
299-
/// See https://en.wikipedia.org/wiki/Unsharp_masking#Digital_unsharp_masking
299+
/// See <https://en.wikipedia.org/wiki/Unsharp_masking#Digital_unsharp_masking>
300300
pub fn unsharpen(&self, sigma: f32, threshold: i32) -> DynamicImage {
301301
dynamic_map!(*self, ref p => imageops::unsharpen(p, sigma, threshold))
302302
}

src/gif.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
//! GIF (Graphics Interchange Format) is an image format that supports lossless compression.
44
//!
55
//! # Related Links
6-
//! * http://www.w3.org/Graphics/GIF/spec-gif89a.txt - The GIF Specification
6+
//! * <http://www.w3.org/Graphics/GIF/spec-gif89a.txt> - The GIF Specification
77
//!
8+
89
extern crate gif;
910

1011
use std::io::{Read, Write};

src/hdr/hdr_decoder.rs

+11-7
Original file line numberDiff line numberDiff line change
@@ -127,19 +127,19 @@ impl RGBE8Pixel {
127127

128128
/// Converts ```RGBE8Pixel``` into ```Rgb<T>``` with scale=1 and gamma=2.2
129129
///
130-
/// color_ldr = (color_hdr*scale)^gamma
130+
/// color_ldr = (color_hdr*scale)<sup>gamma</sup>
131131
///
132-
/// # Panic
133-
///
134-
/// Panics when ```T::max_value()``` cannot be represented as f32.
132+
/// # Panic
133+
///
134+
/// Panics when ```T::max_value()``` cannot be represented as f32.
135135
#[inline]
136136
pub fn to_ldr<T: Primitive + Zero>(self) -> Rgb<T> {
137137
self.to_ldr_scale_gamma(1.0, 2.2)
138138
}
139139

140140
/// Converts RGBE8Pixel into Rgb<T> using provided scale and gamma
141141
///
142-
/// color_ldr = (color_hdr*scale)^gamma
142+
/// color_ldr = (color_hdr*scale)<sup>gamma</sup>
143143
///
144144
/// # Panic
145145
///
@@ -574,10 +574,14 @@ pub struct HDRMetadata {
574574
/// First pair tells how resulting pixel coordinates change along a scanline.
575575
/// Second pair tells how they change from one scanline to the next.
576576
pub orientation: ((i8, i8), (i8, i8)),
577-
/// Divide color values by exposure to get to get physical radiance in watts/steradian/m^2
577+
/// Divide color values by exposure to get to get physical radiance in
578+
/// watts/steradian/m<sup>2</sup>
579+
///
578580
/// Image may not contain physical data, even if this field is set.
579581
pub exposure: Option<f32>,
580-
/// Divide color values by corresponing tuple member (r, g, b) to get to get physical radiance in watts/steradian/m^2
582+
/// Divide color values by corresponing tuple member (r, g, b) to get to get physical radiance
583+
/// in watts/steradian/m<sup>2</sup>
584+
///
581585
/// Image may not contain physical data, even if this field is set.
582586
pub color_correction: Option<(f32,f32,f32)>,
583587
/// Pixel height divided by pixel width

src/hdr/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
//! A decoder for Radiance HDR images
44
//!
55
//! # Related Links
6-
//! * http://radsite.lbl.gov/radiance/refer/filefmts.pdf
7-
//! * http://www.graphics.cornell.edu/~bjw/rgbe/rgbe.c
6+
//!
7+
//! * <http://radsite.lbl.gov/radiance/refer/filefmts.pdf>
8+
//! * <http://www.graphics.cornell.edu/~bjw/rgbe/rgbe.c>
89
//!
910
1011
extern crate scoped_threadpool;

src/ico/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
//! A decoder and encoder for ICO (Windows Icon) image container files.
44
//!
55
//! # Related Links
6-
//! * https://msdn.microsoft.com/en-us/library/ms997538.aspx
7-
//! * https://en.wikipedia.org/wiki/ICO_%28file_format%29
6+
//! * <https://msdn.microsoft.com/en-us/library/ms997538.aspx>
7+
//! * <https://en.wikipedia.org/wiki/ICO_%28file_format%29>
88
99
pub use self::decoder::ICODecoder;
1010
pub use self::encoder::ICOEncoder;

src/imageops/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ pub use self::colorops:: {
4949
};
5050

5151
mod affine;
52-
/// Public only because of Rust bug:
53-
/// https://github.com/rust-lang/rust/issues/18241
52+
// Public only because of Rust bug:
53+
// https://github.com/rust-lang/rust/issues/18241
5454
pub mod colorops;
5555
mod sample;
5656

src/imageops/sample.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ pub fn blur<I: GenericImage + 'static>(image: &I, sigma: f32)
454454
/// ```sigma``` is the amount to blur the image by.
455455
/// ```threshold``` is the threshold for the difference between
456456
///
457-
/// See https://en.wikipedia.org/wiki/Unsharp_masking#Digital_unsharp_masking
457+
/// See <https://en.wikipedia.org/wiki/Unsharp_masking#Digital_unsharp_masking>
458458
// TODO: Do we really need the 'static bound on `I`? Can we avoid it?
459459
pub fn unsharpen<I, P, S>(image: &I, sigma: f32, threshold: i32)
460460
-> ImageBuffer<P, Vec<S>>

src/jpeg/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
//! JPEG (Joint Photographic Experts Group) is an image format that supports lossy compression.
44
//! This module implements the Baseline JPEG standard.
55
//!
6-
//! #Related Links
7-
//! * http://www.w3.org/Graphics/JPEG/itu-t81.pdf - The JPEG specification
6+
//! # Related Links
7+
//! * <http://www.w3.org/Graphics/JPEG/itu-t81.pdf> - The JPEG specification
88
//!
99
1010
pub use self::decoder::JPEGDecoder;

src/math/nq.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//! See "Kohonen neural networks for optimal colour quantization"
33
//! in "Network: Computation in Neural Systems" Vol. 5 (1994) pp 351-367.
44
//! for a discussion of the algorithm.
5-
//! See also http://www.acm.org/~dekker/NEUQUANT.HTML
5+
//! See also <http://www.acm.org/~dekker/NEUQUANT.HTML>
66
77
/* NeuQuant Neural-Net Quantization Algorithm
88
* ------------------------------------------

src/png.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! PNG (Portable Network Graphics) is an image format that supports lossless compression.
55
//!
66
//! # Related Links
7-
//! * http://www.w3.org/TR/PNG/ - The PNG Specification
7+
//! * <http://www.w3.org/TR/PNG/> - The PNG Specification
88
//!
99
1010
extern crate png;
@@ -151,4 +151,4 @@ impl From<png::DecodingError> for ImageError {
151151
CorruptFlateStream => ImageError::FormatError("compressed data stream corrupted".into())
152152
}
153153
}
154-
}
154+
}

src/tga/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Decoding of TGA Images
22
//!
33
//! # Related Links
4-
//! http://googlesites.inequation.org/tgautilities
4+
//! <http://googlesites.inequation.org/tgautilities>
55
66
/// A decoder for TGA images
77
///

src/tiff/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
//! Decoding and Encoding of TIFF Images
1+
//! Decoding and Encoding of TIFF Images
22
//!
3-
//! TIFF (Tagged Image File Format) is a versatile image format that supports
4-
//! lossless and lossy compression.
3+
//! TIFF (Tagged Image File Format) is a versatile image format that supports
4+
//! lossless and lossy compression.
55
//!
6-
//! # Related Links
7-
//! * http://partners.adobe.com/public/developer/tiff/index.html - The TIFF specification
6+
//! # Related Links
7+
//! * <http://partners.adobe.com/public/developer/tiff/index.html> - The TIFF specification
88
//!
99
1010
pub use self::decoder::TIFFDecoder;

0 commit comments

Comments
 (0)