Skip to content

Commit 97d8c3b

Browse files
committed
Merge pull request #65 from pcwalton/export-color
Export `parse_color_keyword` for use in legacy HTML color parsing.
2 parents 1c768a4 + 3f98f13 commit 97d8c3b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/color.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl Color {
6262

6363

6464
#[inline]
65-
fn parse_color_keyword(value: &str) -> Result<Color, ()> {
65+
pub fn parse_color_keyword(value: &str) -> Result<Color, ()> {
6666
let lower_value = value.to_ascii_lower();
6767
let (r, g, b) = match lower_value.as_slice() {
6868
"black" => (0., 0., 0.),

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ extern crate test;
1515
#[cfg(test)]
1616
extern crate serialize;
1717

18+
pub use color::{parse_color_keyword};
1819
pub use tokenizer::{tokenize, Tokenizer};
1920
pub use parser::{parse_stylesheet_rules, StylesheetParser,
2021
parse_rule_list, RuleListParser,

0 commit comments

Comments
 (0)