File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ fn main() -> Result<(), css_inline::InlineError> {
80
80
load_remote_stylesheets : false ,
81
81
.. Default :: default ()
82
82
};
83
- let inliner = css_inline :: CSSInliner (options );
83
+ let inliner = css_inline :: CSSInliner :: new (options );
84
84
let inlined = inliner . inline (HTML );
85
85
// Do something with inlined HTML, e.g. send an email
86
86
Ok (())
Original file line number Diff line number Diff line change 62
62
//! `css-inline` can be configured by using `InlineOptions` and `CSSInliner`:
63
63
//!
64
64
//! ```rust
65
- //! use css_inline;
65
+ //! const HTML: &str = r#"<html>
66
+ //! <head>
67
+ //! <title>Test</title>
68
+ //! <style>h1 { color:blue; }</style>
69
+ //! </head>
70
+ //! <body>
71
+ //! <h1>Big Text</h1>
72
+ //! </body>
73
+ //! </html>"#;
66
74
//!
67
75
//! fn main() -> Result<(), css_inline::InlineError> {
68
76
//! let options = css_inline::InlineOptions {
69
77
//! load_remote_stylesheets: false,
70
78
//! ..Default::default()
71
79
//! };
72
- //! let inliner = css_inline::CSSInliner(options);
80
+ //! let inliner = css_inline::CSSInliner::new (options);
73
81
//! let inlined = inliner.inline(HTML);
74
82
//! // Do something with inlined HTML, e.g. send an email
75
83
//! Ok(())
You can’t perform that action at this time.
0 commit comments