R/remove_ignore_blocks.R

Defines functions remove_ignore_blocks

#' Remove Ignore Blocks
#'
#' Ignore blocks are blocks encapsulated by \code{--rignore} and \code{--end}.
#'
#' @param sql The sql query text.
#' @noRd
remove_ignore_blocks <- function(sql)
{
  gsub("^(?:[\t ]*(?:\r?\n|\r))+", "", gsub("--rignore.*?--end", "", sql), perl = TRUE)
}
smbache/squr documentation built on May 15, 2021, 3:45 a.m.