[HN Gopher] Syntax Highlighting in a Webpage Without JavaScript
___________________________________________________________________
Syntax Highlighting in a Webpage Without JavaScript
Author : tathisit
Score : 21 points
Date : 2021-03-24 20:42 UTC (2 hours ago)
(HTM) web link (fctorial.github.io)
(TXT) w3m dump (fctorial.github.io)
| kaeruct wrote:
| I think the point of this article is the constexpr.js library,
| not the fact that syntax highlighting on the server-side is
| possible
| viseztrance wrote:
| Looks like we've gone full circle.
| gtsop wrote:
| What do you mean? Honestly interested
| the-dude wrote:
| 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.
| bugfix wrote:
| What is so special about this? This is the way websites have been
| doing syntax highlighting before people started using javascript
| libraries.
| amatecha wrote:
| 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
| SahAssar wrote:
| ...By running the same JS on the server or in a build step.
___________________________________________________________________
(page generated 2021-03-24 23:01 UTC)