🔍 An RStudio addin slash regex utility belt
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

17 linhas
401B

  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. utils::globalVariables(c("loc", "type"))