Live data from Hacker News

Syntax Highlighting in a Webpage Without JavaScript

fctorial.github.io

1–10 of 44 posts

Re: Syntax Highlighting in a Webpage Without JavaScript

#4
post #3

What is so special about this? This is the way websites have been doing syntax highlighting before people started using javascript libraries.

Right, looks like it's just preprocessing the content with a static site generator to insert markup + CSS classes around the different syntactical pieces. /shrug

Re: Syntax Highlighting in a Webpage Without JavaScript

#8
post #6

Looks like we've gone full circle.

What do you mean? Honestly interested

My take? In the beginning, we had to do everything server-side. Then, doing as much as possible client-side was all the rage.

And now we are bringing these client-side libraries back to the server.

Re: Syntax Highlighting in a Webpage Without JavaScript

#9
Well I for one wish I’d known about this (specifically constexpr.js) sooner. I like to develop sites with TS, but generally prefer to ship as little of it to the client as possible. There are a few solutions for this but most have some kind of compromise or another. It’s good to see another contender out there!
Post reply on HN