@@ -392,11 +392,11 @@ pub struct ExtensionOptions<'c> {
392392 /// use comrak::parse_document;
393393 /// let mut options = Options::default();
394394 /// options.extension.front_matter_delimiter = Some("---".to_owned());
395- /// let arena = Arena::new();
395+ /// let mut arena = Arena::new();
396396 /// let input ="---\nlayout: post\n---\nText\n";
397- /// let root = parse_document(&arena, input, &options);
397+ /// let root = parse_document(&mut arena, input, &options);
398398 /// let mut buf = String::new();
399- /// format_commonmark(&root, &options, &mut buf);
399+ /// format_commonmark(&arena, root, &options, &mut buf);
400400 /// assert_eq!(buf, input);
401401 /// ```
402402 pub front_matter_delimiter : Option < String > ,
@@ -876,17 +876,17 @@ pub struct RenderOptions {
876876 /// ```
877877 /// # use comrak::{parse_document, Options, format_commonmark};
878878 /// # fn main() {
879- /// # let arena = indextree::Arena::new();
879+ /// # let mut arena = indextree::Arena::new();
880880 /// let mut options = Options::default();
881- /// let node = parse_document(&arena, "hello hello hello hello hello hello", &options);
881+ /// let node = parse_document(&mut arena, "hello hello hello hello hello hello", &options);
882882 /// let mut output = String::new();
883- /// format_commonmark(node, &options, &mut output).unwrap();
883+ /// format_commonmark(&arena, node, &options, &mut output).unwrap();
884884 /// assert_eq!(output,
885885 /// "hello hello hello hello hello hello\n");
886886 ///
887887 /// options.render.width = 20;
888888 /// let mut output = String::new();
889- /// format_commonmark(node, &options, &mut output).unwrap();
889+ /// format_commonmark(&arena, node, &options, &mut output).unwrap();
890890 /// assert_eq!(output,
891891 /// "hello hello hello\nhello hello hello\n");
892892 /// # }
@@ -1035,18 +1035,18 @@ pub struct RenderOptions {
10351035 /// ```rust
10361036 /// # use std::str;
10371037 /// # use comrak::{Arena, Options, format_commonmark, parse_document};
1038- /// let arena = Arena::new();
1038+ /// let mut arena = Arena::new();
10391039 /// let mut options = Options::default();
10401040 /// let input = "```\nhello\n```\n";
1041- /// let root = parse_document(&arena, input, &options);
1041+ /// let root = parse_document(&mut arena, input, &options);
10421042 ///
10431043 /// let mut buf = String::new();
1044- /// format_commonmark(&root, &options, &mut buf);
1044+ /// format_commonmark(&arena, root, &options, &mut buf);
10451045 /// assert_eq!(buf, " hello\n");
10461046 ///
10471047 /// buf.clear();
10481048 /// options.render.prefer_fenced = true;
1049- /// format_commonmark(&root, &options, &mut buf);
1049+ /// format_commonmark(&arena, root, &options, &mut buf);
10501050 /// assert_eq!(buf, "```\nhello\n```\n");
10511051 /// ```
10521052 #[ cfg_attr( feature = "bon" , builder( default ) ) ]
0 commit comments