Skip to content

Commit

Permalink
Add notes and TODOs for active file formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
erictleung committed May 26, 2023
1 parent ec7f172 commit f718bb5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion R/black.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ style_black <- function() {
id = capture[["id"]])
}

#' TODO
#' TODO Style entire active file
#'
#' Assumes file is a standard RMarkdown or Quarto document with Python-labeled
#' codeblocks.
#'
#' Inspiration: https://github.com/r-lib/styler/blob/main/R/addins.R#L50
style_active_file_black <- function() {
if(Sys.which("black") == ""){
stop(
Expand All @@ -55,4 +60,6 @@ style_active_file_black <- function() {
# Grab code highlighted
capture <- rstudioapi::getSourceEditorContext()
capture

# Parse through document to extract only Python code blocks
}

0 comments on commit f718bb5

Please sign in to comment.