You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be an escaping issue in Word output when a formatting function applied via fmt() uses a less than symbol.
In the example below, I am formatting all number less than one to be displayed as <1 instead of their true value. The result should be the Word version of this table.
Thank you!
Reproducible example
packageVersion("gt")
#> [1] '0.9.0.9000'tibble::tibble(x= c(0.5, 1, 2)) |>gt::gt() |>gt::fmt(fns= \(x) ifelse(x<1, "<1", as.character(x))) |>gt::gtsave("test.docx")
#> Error in read_xml.raw(charToRaw(enc2utf8(x)), "UTF-8", ..., as_html = as_html, : StartTag: invalid element name [68]
Dan, I just tried out that example in my build of gt (which is at the most recent GH commit) and it works fine! I think that @thebioengineer fixed this as part of #1401. Could you update to the very latest and verify on your end?
Description
Hello! 🍁
There seems to be an escaping issue in Word output when a formatting function applied via
fmt()
uses a less than symbol.In the example below, I am formatting all number less than one to be displayed as
<1
instead of their true value. The result should be the Word version of this table.Thank you!
Reproducible example
Created on 2023-08-28 with reprex v2.0.2
Session info
The text was updated successfully, but these errors were encountered: