It is currently March 28th, 2024, 8:08 pm

Code highlighting on the forum

Discussions about the documentation, main Rainmeter site and forums.
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Code highlighting on the forum

Post by Active Colors »

How about using this small library to highlight the code? https://highlightjs.org/
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Code highlighting on the forum

Post by jsmorley »

Active Colors wrote: October 19th, 2018, 10:34 am How about using this small library to highlight the code? https://highlightjs.org/
We have looked at that in the past, and decided it was just more work than it was worth. Doing syntax highlighting on a basic .ini formatted file is not terribly difficult, there are libraries for that. Doing it for the Rainmeter syntax, as is done in Notepad++ with RainLexer, is complicated indeed, as there are hundreds of keywords and conditions, which should only be highlighted when they are in certain positions in the code. In addition, it's a moving target, as Rainmeter is constantly evolving.

We do the basic .ini highlighting in the documentation, mostly just to help the code stand out from the enormous amounts of stuff on a documentation page.

Just doing .ini file highlighting in the forums is close to pointless and at best a minor cosmetic eye-candy, and doing Rainmeter highlighting is something we are just not going to saddle this project with.