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
expected<-"example\n\n$a_{ij}$ \n"temp_file<-withr::local_tempfile()
brio::write_lines(expected, temp_file)
wool<-tinkr::yarn$new(temp_file)
wool$body<-tinkr::protect_curly(wool$body)
wool$body<-tinkr::protect_math(wool$body)
#> Error: Inline math delimiters are not balanced.#> #> HINT: If you are writing BASIC code, make sure you wrap variable#> names and code in backtics like so: `INKEY$`.#> #> Below are the pairs that were found:#> start...end#> -----...---#> $a_...
I knew that these switches would come back to bite me in the end 🙈
I think we have three steps that we can take to solve this (and I am more than happy to do the implementation!)
Basic 😐 : add documentation specifying correct order
Plus 🙂 : add warning to protect_math() if there is previous curly protection
Premium 😃 : add unprotect_[thing]() functions that remove protections previously implemented so that we can preemptively unprotect_curly() during protect_math().
Exclusive 😁 : re-implement protection to not fragment text nodes but instead use attributes indicating column position.
Having these as actual switches instead of irreversible steps would make the experience of transferring data much easier.
Maybe to be included in the docs?
Bad
Created on 2024-04-05 with reprex v2.1.0
Not bad
Created on 2024-04-05 with reprex v2.1.0
h/t @xtimbeau in ropensci-review-tools/babeldown#68
The text was updated successfully, but these errors were encountered: