Skip to content

Commit

Permalink
Stata engine - more specific cleanup of files (#2210)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hemken authored Jan 25, 2023
1 parent 4767f7e commit 4f1d331
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/engine.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ engine_output = function(options, code, out, extra = NULL) {
if (length(out) != 1L) out = one_string(out)
out = sub('([^\n]+)$', '\\1\n', out)
if (options$engine == 'stata') {
out = gsub('\n+running.*profile.do', '', out)
out = sub('...\n+', '', out)
out = sub('\n. \nend of do-file\n', '', out)
out = gsub('\n+running.*profile\\.do', '', out)
out = sub('\\.\\.\\.\n+', '', out)
out = sub('\n\\. \nend of do-file\n', '', out)
}
one_string(c(
if (length(options$echo) > 1L || options$echo) knit_hooks$get('source')(code, options),
Expand Down

0 comments on commit 4f1d331

Please sign in to comment.