Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellga committed May 3, 2024
1 parent ce3ba2f commit 737b42d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rdocs"
version = "0.1.43"
version = "0.1.44"
edition = "2021"
repository = "https:/daniellga/rdocs/"

Expand Down
2 changes: 1 addition & 1 deletion rdocs/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rdocs
Title: Create Quarto documentation for R files from comments
Version: 0.1.43
Version: 0.1.44
Authors@R:
person("Daniel", "Gurgel", , "[email protected]", role = c("aut", "cre"))
Description: Generate R documentation in Quarto format based on comments in code files.
Expand Down
10 changes: 7 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,11 @@ fn output_file(hash: HashMap<String, Vec<String>>, folder_name_hidden: &str) {

fn eval_examples(mut examples: Vec<String>) {
// Construct the output text.
// remove empty lines resulting in ";;".
// Remove empty lines resulting in ";;".
examples.retain(|s| !s.is_empty());
let output_text = examples.join(";");
let mut output_text = examples.join(";");
// Needed because the last "***end_of_example" was not followed by ";".
output_text.push(';');

// Iterate for each example chunk in the file.
for example in output_text.split("***end_of_example;") {
Expand Down Expand Up @@ -234,7 +236,9 @@ fn quarto_process(folder_name: &str, folder_name_hidden: &str) {
"render",
folder_name_hidden,
"--output-dir",
output_path.to_str().unwrap(),
output_path
.to_str()
.expect("Failed to execute quarto render."),
])
.output();
}
Expand Down

0 comments on commit 737b42d

Please sign in to comment.