Syntax Highlighting in a Webpage Without JavaScript
fctorial.github.io
Syntax Highlighting in a Webpage Without JavaScript
1–10 of 44 posts
Re: Syntax Highlighting in a Webpage Without JavaScript
#2Looks like we've gone full circle.
Re: Syntax Highlighting in a Webpage Without JavaScript
#3What is so special about this? This is the way websites have been doing syntax highlighting before people started using javascript libraries.
Re: Syntax Highlighting in a Webpage Without JavaScript
#4What 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
#5I think the point of this article is the constexpr.js library, not the fact that syntax highlighting on the server-side is possible
Re: Syntax Highlighting in a Webpage Without JavaScript
#6Looks like we've gone full circle.
What do you mean? Honestly interested
Re: Syntax Highlighting in a Webpage Without JavaScript
#7...By running the same JS on the server or in a build step.
Re: Syntax Highlighting in a Webpage Without JavaScript
#8Re: Syntax Highlighting in a Webpage Without JavaScript
#9Well 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!
Re: Syntax Highlighting in a Webpage Without JavaScript
#10Right. You just do it on the server. Okay?