On Mon, Sep 12, 2022 at 7:55 PM Junio C Hamano <gitster@xxxxxxxxx> wrote: > "Eric Sunshine via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes: > > + $checked =~ s/(\?![^?]+\?!)/$c->{bold}$c->{red}$1$c->{reset}/mg; > > It may be just me, but coloring the whole "?!LOOP?!" in red feels a > bit strange. I would have expected more like > > if ($c->{color_in_use}) { > $checked =~ s/\?!([^?]+)\?!/$c->{bold}$c->{red}$1$c->{reset}/mg; > } > > IOW, switching between "?!LOOP?!" and "<BOLD><RED>LOOP<RESET>". > > But it may be just me. That's possible, but I'd rather not do that for a couple reasons: (1) Even with the coloring, I still find it handy to be able to search for "?!" in the output in order to jump to the next problem (or to filter to just the problem lines via, say, grep). (2) In practice, I found that even after coloring those annotations in red, it was still easy for the eye to glide right over them in the output without really noticing them. Switching it to bold red helped a bit, but my eye still glided over them sometimes. One possible reason that the eye was able to glide over them may be because the "?!FOO?!" annotations are very short bits of text buried in the much larger and textually noisy test body. As such, having more characters "?!...?!" may help capture the eye more easily than fewer characters. (In fact, I briefly considered coloring the entire line red to combat the eye-gliding problem but wasn't sure if that would be helpful or hurtful.)