diff --git a/.circleci/config.yml b/.circleci/config.yml index 9e41c74..e827cc3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,8 +38,8 @@ jobs: steps: - checkout - run: cargo --version - - run: cargo build - # - run: cargo test + - run: cargo build --features=css + - run: cargo test --features=css build-windows: executor: name: win/default diff --git a/CHANGELOG.md b/CHANGELOG.md index 595d238..6c368b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ Possible log types: ### Latest +### 0.13.2 + +- [fixed] Fixed errors when building with Rust 1.72. + ### 0.13.1 - [added] html2text now has --show-dom diff --git a/Cargo.toml b/Cargo.toml index 621b71d..3a9605f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "html2text" -version = "0.13.1" +version = "0.13.2" authors = ["Chris Emerson "] description = "Render HTML as plain text." repository = "https://github.com/jugglerchris/rust-html2text/" diff --git a/src/css/parser.rs b/src/css/parser.rs index 0419d6b..eac743b 100644 --- a/src/css/parser.rs +++ b/src/css/parser.rs @@ -14,7 +14,7 @@ use nom::{ }; #[derive(Debug, PartialEq)] -pub enum Colour { +pub(crate) enum Colour { Rgb(u8, u8, u8), } @@ -27,7 +27,7 @@ impl From for crate::Colour { } #[derive(Debug, PartialEq)] -pub enum LengthUnit { +pub(crate) enum LengthUnit { // Absolute units In, Cm, @@ -41,7 +41,7 @@ pub enum LengthUnit { } #[derive(Debug, PartialEq)] -pub enum Height { +pub(crate) enum Height { #[allow(unused)] Auto, // If the length is 0, the unit will be Px @@ -49,7 +49,7 @@ pub enum Height { } #[derive(Debug, PartialEq)] -pub enum Overflow { +pub(crate) enum Overflow { Visible, Hidden, Scroll, @@ -58,14 +58,14 @@ pub enum Overflow { #[non_exhaustive] #[derive(Debug, PartialEq)] -pub enum Display { +pub(crate) enum Display { None, Other, } #[derive(Debug, PartialEq)] #[non_exhaustive] -pub enum Decl { +pub(crate) enum Decl { Color { value: Colour, }, @@ -160,7 +160,7 @@ struct RawValue<'s> { } #[derive(Debug, PartialEq)] -pub struct Declaration { +pub(crate) struct Declaration { pub data: Decl, pub important: Importance, } @@ -174,7 +174,7 @@ pub(crate) struct RuleSet { } #[derive(Debug, PartialEq)] -pub struct PropertyName(String); +pub(crate) struct PropertyName(String); fn match_comment(text: &str) -> IResult<&str, ()> { let (rest, _) = tag("/*")(text)?; @@ -389,12 +389,12 @@ pub(crate) fn parse_color_attribute( } #[derive(Copy, Clone, PartialEq, Eq, Debug)] -pub enum Importance { +pub(crate) enum Importance { Default, Important, } -pub fn parse_declaration(text: &str) -> IResult<&str, Option> { +pub(crate) fn parse_declaration(text: &str) -> IResult<&str, Option> { let (rest, (prop, _ws1, _colon, _ws2, value)) = tuple(( parse_property_name, skip_optional_whitespace, @@ -723,7 +723,7 @@ fn parse_white_space( Ok(WhiteSpace::Normal) } -pub fn parse_rules(text: &str) -> IResult<&str, Vec> { +pub(crate) fn parse_rules(text: &str) -> IResult<&str, Vec> { separated_list0( tuple((tag(";"), skip_optional_whitespace)), parse_declaration,