Properly handle double carets in the console element