Conversation
|
Oh yes, I discovered problems with |
|
Yeah.. I have attempted to fix this before, but I never got it. I am out of idea... Also, how is If they are the same, maybe we could attempt to normalize <<{1}<<{2}<<{3}>>>>>> to <<{1}>><<{2}>><<{3}>> with a deprecation warning? Another idea I had was to change |
I believe the idea was that if {2} is missing, both {2} and {3} would be removed. Some examples:
A sort of weird idea to make this work is to substitute an uncommon literal character in a run of |
| if (m_start == -1) { | ||
| # Add safeguard instead of going in a very long loop | ||
| # rstudio/gt#1880 | ||
| cli::cli_abort("Can't resolve pattern.", .internal = TRUE) | ||
| } |
There was a problem hiding this comment.
This is probably the only part I am satisfied with in this PR. It prevents infinite loops from happening. The rest doesn't work as intended.
Summary
2 tests are failing which I need to investigate, but opening in case you know how to fix.
Basically, the regexp was wrong in this case which caused an infinite loop. So, I added a condition which makes the case where no match occur error early. Just need to figure out why the test is failing and also how I could simplify the test.
Also needs news.
Seems like this creates problems for more than 2 <<
Should get
c("111", "2", "33", "4"), but we are erasing everything as soon as there is NA in the first column.Should get
c("111", "2", "33", "4")in the first column..Related GitHub Issues and PRs
patternmanages NAs infmt_icon() |> cols_merge(),NAgets repeatedly appended to the value. #1880Checklist
testthatunit tests totests/testthatfor any new functionality.