That's an entirely different problem I'd say, and the perfect use case for these libraries on a client! If you'd do it server side it would be like a local IDE sending the code to be lexed remotely...
My rantiness (I apologize for that) targets programming blogs/static pages.