Skip to content

Commit 15807cf

Browse files
committed
Revert "Solved the LaTeX2exp error. Closes #2027 (#2030)"
This reverts commit aeaecd6.
1 parent aeaecd6 commit 15807cf

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

R/ggplotly.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,6 @@ italic <- function(x) paste("<i>", x, "</i>")
13031303

13041304
# if a vector that has one unique value (ignoring missings), return that value
13051305
uniq <- function(x) {
1306-
x <- remove_class(x, "TeX")
13071306
u <- unique(x)
13081307
if (identical(u, NA) || length(u) == 0) return(u)
13091308
u <- u[!is.na(u)]
@@ -1434,4 +1433,4 @@ getAesMap <- function(plot, layer) {
14341433
} else {
14351434
layer$mapping
14361435
}
1437-
}
1436+
}

tests/testthat/_snaps/latex2exp/latex2exp-rendering.svg

-1
This file was deleted.

tests/testthat/helper-vdiffr.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ write_plotly_svg <- function(p, file) {
5151

5252
# strip out non-deterministic fullLayout.uid
5353
# TODO: if and when plotly provides an API to pre-specify, use it!
54-
svg_txt <- readLines(basename(file), warn = FALSE)
54+
svg_txt <- readLines(file, warn = FALSE)
5555
strextract <- function(str, pattern) regmatches(str, regexpr(pattern, str))
5656
def <- strextract(svg_txt, 'defs id=\\"defs-[[:alnum:]]+\\"')
5757
uid <- sub("defs-", "", strextract(def, "defs-[[:alnum:]]+"))
5858
svg_txt <- gsub(uid, "", svg_txt, fixed = TRUE)
59-
writeLines(svg_txt, basename(file))
59+
writeLines(svg_txt, file)
6060
}
6161

6262
# copied from vdiffr

tests/testthat/test-latex2exp.R

-9
This file was deleted.

0 commit comments

Comments
 (0)