@@ -84,7 +84,7 @@ use alloc::string::String;
84
84
/// ```
85
85
/// use markdown::to_html;
86
86
///
87
- /// assert_eq!(to_html("# Hello, world !"), "<h1>Hello, world !</h1>");
87
+ /// assert_eq!(to_html("# Hi Mercury !"), "<h1>Hi Mercury !</h1>");
88
88
/// ```
89
89
pub fn to_html ( value : & str ) -> String {
90
90
to_html_with_options ( value, & Options :: default ( ) ) . unwrap ( )
@@ -107,12 +107,12 @@ pub fn to_html(value: &str) -> String {
107
107
/// # fn main() -> Result<(), markdown::message::Message> {
108
108
///
109
109
/// // Use GFM:
110
- /// let result = to_html_with_options("~hi~hello !", &Options::gfm())?;
110
+ /// let result = to_html_with_options("~Venus~Mars !", &Options::gfm())?;
111
111
///
112
- /// assert_eq!(result, "<p><del>hi </del>hello !</p>");
112
+ /// assert_eq!(result, "<p><del>Venus </del>Mars !</p>");
113
113
///
114
114
/// // Live dangerously / trust the author:
115
- /// let result = to_html_with_options("<div>\n\n# Hello, world !\n\n</div>", &Options {
115
+ /// let result = to_html_with_options("<div>\n\n# Hi Jupiter !\n\n</div>", &Options {
116
116
/// compile: CompileOptions {
117
117
/// allow_dangerous_html: true,
118
118
/// allow_dangerous_protocol: true,
@@ -121,7 +121,7 @@ pub fn to_html(value: &str) -> String {
121
121
/// ..Options::default()
122
122
/// })?;
123
123
///
124
- /// assert_eq!(result, "<div>\n<h1>Hello, world !</h1>\n</div>");
124
+ /// assert_eq!(result, "<div>\n<h1>Hi Jupiter !</h1>\n</div>");
125
125
/// # Ok(())
126
126
/// # }
127
127
/// ```
@@ -150,10 +150,10 @@ pub fn to_html_with_options(value: &str, options: &Options) -> Result<String, me
150
150
/// use markdown::{to_mdast, ParseOptions};
151
151
/// # fn main() -> Result<(), markdown::message::Message> {
152
152
///
153
- /// let tree = to_mdast("# Hey, *you *!", &ParseOptions::default())?;
153
+ /// let tree = to_mdast("# Hi *Earth *!", &ParseOptions::default())?;
154
154
///
155
155
/// println!("{:?}", tree);
156
- /// // => Root { children: [Heading { children: [Text { value: "Hey, ", position: Some(1:3-1:8 (2-7 )) }, Emphasis { children: [Text { value: "you ", position: Some(1:9 -1:12 (8 -11)) }], position: Some(1:8 -1:13 (7 -12)) }, Text { value: "!", position: Some(1:13-1:14 (12-13)) }], position: Some(1:1-1:14 (0-13)), depth: 1 }], position: Some(1:1-1:14 (0-13)) }
156
+ /// // => Root { children: [Heading { children: [Text { value: "Hi ", position: Some(1:3-1:6 (2-5 )) }, Emphasis { children: [Text { value: "Earth ", position: Some(1:7 -1:12 (6 -11)) }], position: Some(1:6 -1:13 (5 -12)) }, Text { value: "!", position: Some(1:13-1:14 (12-13)) }], position: Some(1:1-1:14 (0-13)), depth: 1 }], position: Some(1:1-1:14 (0-13)) }
157
157
/// # Ok(())
158
158
/// # }
159
159
/// ```
0 commit comments