@@ -14,22 +14,16 @@ use parser::{parse_stylesheet_rules, StylesheetParser};
1414
1515/// Determine the character encoding of a CSS stylesheet and decode it.
1616///
17- /// This is based on the presence of a :abbr:`BOM (Byte Order Mark)`,
18- /// an `@charset` rule,
19- /// and encoding meta-information.
17+ /// This is based on the presence of a BOM (Byte Order Mark), an `@charset` rule, and
18+ /// encoding meta-information.
2019///
21- /// :param css_bytes: A byte string.
22- /// :param protocol_encoding:
23- /// The encoding label, if any, defined by HTTP or equivalent protocol.
20+ /// * `css_bytes`: A byte string.
21+ /// * `protocol_encoding`: The encoding label, if any, defined by HTTP or equivalent protocol.
2422/// (e.g. via the `charset` parameter of the `Content-Type` header.)
25- /// :param environment_encoding:
26- /// An optional `Encoding` object
27- /// for the `environment encoding
28- /// <http://www.w3.org/TR/css-syntax/#environment-encoding>`_,
29- /// if any.
30- /// :returns:
31- /// A 2-tuple of a decoded Unicode string
32- /// and the `Encoding` object that was used.
23+ /// * `environment_encoding`: An optional `Encoding` object for the [environment encoding]
24+ /// (http://www.w3.org/TR/css-syntax/#environment-encoding), if any.
25+ ///
26+ /// Returns a 2-tuple of a decoded Unicode string and the `Encoding` object that was used.
3327pub fn decode_stylesheet_bytes ( css : & [ u8 ] , protocol_encoding_label : Option < & str > ,
3428 environment_encoding : Option < EncodingRef > )
3529 -> ( String , EncodingRef ) {
@@ -78,18 +72,14 @@ fn decode_replace(input: &[u8], fallback_encoding: EncodingRef)-> (String, Encod
7872
7973/// Parse stylesheet from bytes.
8074///
81- /// :param css_bytes: A byte string.
82- /// :param protocol_encoding:
83- /// The encoding label, if any, defined by HTTP or equivalent protocol.
75+ /// * `css_bytes`: A byte string.
76+ /// * `protocol_encoding`: The encoding label, if any, defined by HTTP or equivalent protocol.
8477/// (e.g. via the `charset` parameter of the `Content-Type` header.)
85- /// :param environment_encoding:
86- /// An optional `Encoding` object
87- /// for the `environment encoding
88- /// <http://www.w3.org/TR/css-syntax/#environment-encoding>`_,
89- /// if any.
90- /// :returns:
91- /// A 2-tuple of a Iterator<Result<Rule, SyntaxError>>
92- /// and the `Encoding` object that was used.
78+ /// * `environment_encoding`: An optional `Encoding` object for the [environment encoding]
79+ /// (http://www.w3.org/TR/css-syntax/#environment-encoding), if any.
80+ ///
81+ /// Returns a 2-tuple of a `Iterator<Result<Rule, SyntaxError>>`
82+ /// and the `Encoding` object that was used.
9383pub fn parse_stylesheet_rules_from_bytes (
9484 css_bytes : & [ u8 ] , protocol_encoding_label : Option < & str > ,
9585 environment_encoding : Option < EncodingRef > )
0 commit comments