Skip to content

Commit

Permalink
positron support
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Nov 14, 2024
1 parent fdf031d commit c58aeb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/posit.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ is_posit <- function() {
is_posit_notebook <- function() {
flag <- FALSE
if (is_posit()) {
con <- rstudioapi::getActiveDocumentContext()
if (isTRUE(grepl("\\.qmd$|\\.Rmd$", con[["path"]]))) {
con <- rstudioapi::getSourceEditorContext()[["path"]]
if (isTRUE(grepl("\\.qmd$|\\.Rmd$", con))) {
flag <- TRUE
}
}
Expand Down

0 comments on commit c58aeb2

Please sign in to comment.