Added code to process and render HTML with correct highlighting