From c62a8bdb1d144de2b67c08325c650c071e7dbb4e Mon Sep 17 00:00:00 2001 From: daniellga Date: Thu, 2 May 2024 15:08:01 -0300 Subject: [PATCH] fix --- Cargo.toml | 2 +- rdocs/DESCRIPTION | 2 +- src/main.rs | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b2892e9..0792753 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rdocs" -version = "0.1.40" +version = "0.1.41" edition = "2021" repository = "https://github.com/daniellga/rdocs/" diff --git a/rdocs/DESCRIPTION b/rdocs/DESCRIPTION index 05d58ff..a4f33b3 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.40 +Version: 0.1.41 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 526cf35..34ffb04 100644 --- a/src/main.rs +++ b/src/main.rs @@ -196,8 +196,10 @@ fn output_file(hash: HashMap>, folder_name_hidden: &str) { } } -fn eval_examples(examples: Vec) { +fn eval_examples(mut examples: Vec) { // Construct the output text. + // remove empty lines resulting in ";;". + examples.retain(|s| !s.is_empty()); let output_text = examples.join(";"); let output = Command::new("Rscript")