Speed up document rendering on the website
Speed up document rendering on the website

I noticed a peformance degradation in rendering documents when we
switched to the highlights library. The reason for this was that
highlights generates a lot more HTML tags than highlight.js or Prism.

Notably, highlights wraps each piece of text in a <span> tag, even if it
doesn't have any CSS class. Well, it turns out these class-less <span>
tags were slowing down rendering, because when we strip them out, the
rendering performance goes back to normal.

janko-m/shrine,janko-m/shrine