Closed
Description
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 calling show
and then splicing the result within the hl
interpolator).
I propose we change the API of the hl
interpolator as follow:
def hl(args: Showable*)(implicit ctx: Context): String
A user of the interpolator will now need to be explicit when splicing String
s with the hl
interpolator. It is a bit cumbersome, but will prevent re-coloring. We can provide helper function (or interpolator) to go from String
to Showable
.
@felixmulder WDYT?