Skip to content

Commit

Permalink
fix regex
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellga committed Mar 24, 2024
1 parent 57fe55b commit 4585c6e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 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.27"
version = "0.1.28"
edition = "2021"
repository = "https://github.com/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.27
Version: 0.1.28
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
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ fn generate_r_docs(
// Regular expression to match function declarations
let fn_declaration_regex = Regex::new(r"\s*fn\s+[a-zA-Z_]\w*\s*\(").unwrap();
let function_declaration_regex =
Regex::new(r"\s*function\s+[a-zA-Z_]\w*\s*\(").unwrap();
Regex::new(r"^\s*[^#]*(?:<-|==)\s*function\s*\([^()]*\)\s*\{").unwrap();

// add the source text. Code on github must be updated.
if last_line_was_comment
Expand Down

0 comments on commit 4585c6e

Please sign in to comment.