🔍 An RStudio addin slash regex utility belt
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

18 行
469B

  1. # highr:::escape_html
  2. # by Yihui Xie, GPL license
  3. # https://github.com/yihui/highr/blob/4f54a5b8960d6246daadacea1020ebcdc458ce50/R/utils.R#L54-L61
  4. escape_html = function(x) {
  5. x = gsub('&', '&', x)
  6. x = gsub('<', '&lt;', x)
  7. x = gsub('>', '&gt;', x)
  8. x = gsub('"', '&quot;', x)
  9. x
  10. }
  11. escape_backslash <- function(x) {
  12. gsub("\\\\", "\\\\\\\\", x)
  13. }
  14. # avoid CRAN note for tidyr::gather in wrap_results
  15. utils::globalVariables(c("end", "loc", "start", "type"))