Closed maelle closed 7 months ago
lines <- c("bla", "$a=1$")
temp_file <- withr::local_tempfile()
writeLines(lines, temp_file)
wool <- tinkr::yarn$new(temp_file)
tinkr::protect_math(wool$body)
#> {xml_document}
#> <document xmlns="http://commonmark.org/xml/1.0">
#> [1] <paragraph>\n <text xml:space="preserve">bla</text>\n <softbreak/>\n < ...
Created on 2024-04-04 with reprex v2.1.0
vs
lines <- c("bla", "$a$")
temp_file <- withr::local_tempfile()
writeLines(lines, temp_file)
wool <- tinkr::yarn$new(temp_file)
tinkr::protect_math(wool$body)
#> Error in char[[1]]: subscript out of bounds
Created on 2024-04-04 with reprex v2.1.0
Reported by @xtimbeau via https://github.com/ropensci-review-tools/babeldown/issues/60 and related discussions
I'll try to fix it.