diff --git a/Cargo.toml b/Cargo.toml index 75e88aa..5246a76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rdocs" -version = "0.1.36" +version = "0.1.37" edition = "2021" repository = "https://github.com/daniellga/rdocs/" diff --git a/rdocs/DESCRIPTION b/rdocs/DESCRIPTION index 85567a2..5cbf651 100644 --- a/rdocs/DESCRIPTION +++ b/rdocs/DESCRIPTION @@ -1,6 +1,6 @@ Package: rdocs Title: Create Quarto documentation for R files from comments -Version: 0.1.36 +Version: 0.1.37 Authors@R: person("Daniel", "Gurgel", , "daniellga@gmail.com", role = c("aut", "cre")) Description: Generate R documentation in Quarto format based on comments in code files. diff --git a/src/main.rs b/src/main.rs index 3d6059e..a6913c1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -198,16 +198,7 @@ fn output_file(hash: HashMap>, folder_name_hidden: &str) { fn eval_examples(examples: Vec) { // Construct the output text. - let pkg_name_string = std::env::current_dir().unwrap(); - let pkg_name = pkg_name_string - .as_path() - .file_name() - .unwrap() - .to_str() - .unwrap(); - // Make a call to "library("pkg_name")" before the example block is run. - let pkg_call = ["library", pkg_name].join(" "); - let output_text = [pkg_call.as_str(), examples.join(";").as_str()].join(";"); + let output_text = examples.join(";"); let output = Command::new("Rscript") .args(["--vanilla", "-e", output_text.as_str()])