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
This is due to formatters historically/currently being somewhat overly aggresive in guessing where referential footnotes are
I'd like to relax this to checking for the pattern " [{][^}]+[}]" (including the space)
This is due to formatting instructions being embedded in strings in the form, e.g., "~{super a}" for superscripted a in study metadata tracking tools. I didn't choose this, but I also can't change it, and with the leading ~ it is distinguishable from a referential footnote.
This will require a change to how refdefs are inferred in formatters to be safe, in particular, here:
Splitting that one gsub into two regexes, one grep to detect them which has the space and then the gsub to extract them, should be sufficient, e.g.,
refs <- matrix("", nrow = nrow(strs), ncol = ncol(strs))
haveref <- grepl(" [{][^}]*[}]", strs) ## with space
refs[haveref] <- gsub("^[^{]*([{]([^}]+)[}]){0,1}$", "\\2", strs[haveref]) ## without space, but only ones we know had one
The text was updated successfully, but these errors were encountered:
Currently any use of "{" or "}" in a label is disallowed here:
rtables/R/00tabletrees.R
Line 23 in bdafa9d
This is due to formatters historically/currently being somewhat overly aggresive in guessing where referential footnotes are
I'd like to relax this to checking for the pattern " [{][^}]+[}]" (including the space)
This is due to formatting instructions being embedded in strings in the form, e.g., "~{super a}" for superscripted a in study metadata tracking tools. I didn't choose this, but I also can't change it, and with the leading ~ it is distinguishable from a referential footnote.
This will require a change to how refdefs are inferred in formatters to be safe, in particular, here:
https://github.com/insightsengineering/formatters/blob/63530282db089234559b865ef031814907ec6075/R/matrix_form.R#L381
Splitting that one gsub into two regexes, one grep to detect them which has the space and then the gsub to extract them, should be sufficient, e.g.,
The text was updated successfully, but these errors were encountered: