Rework hl interpolator #3655
Labels
area:reporting
Error reporting including formatting, implicit suggestions, etc
exp:intermediate
itype:enhancement
We are currently having issues with the
hl
interpolator.After adding syntax highlighting to
Showable
, we now sometime leaks colors in error messages (e.g. #3614). The reason is because we sometime try to syntax highlight twice (first by callingshow
and then splicing the result within thehl
interpolator).I propose we change the API of the
hl
interpolator as follow:A user of the interpolator will now need to be explicit when splicing
String
s with thehl
interpolator. It is a bit cumbersome, but will prevent re-coloring. We can provide helper function (or interpolator) to go fromString
toShowable
.@felixmulder WDYT?
The text was updated successfully, but these errors were encountered: