Skip to content

Commit

Permalink
add regex code comment
Browse files Browse the repository at this point in the history
  • Loading branch information
slager committed Aug 13, 2024
1 parent f5e855b commit c48a95c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/reproducibility_tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ get_session_info <- function(){
# Replacing @ with # in source
my_session_info2$source <- gsub('\\(@', '(', my_session_info2$source)
# Use short git hash
# find '@' followed by 40 hex digits,
# and substitute with the '@' and the first 7 hex digits in ()-captured group.
my_session_info2$source <- sub(
'([@][0-9a-f]{7})[0-9a-f]{33}',
'\\1',
Expand Down

0 comments on commit c48a95c

Please sign in to comment.