It is currently January 17th, 2019, 1:33 am

Code highlighting on the forum

Discussion about the documentation, main Rainmeter site and forums.
User avatar
Active Colors
Moderator
Posts: 499
Joined: February 16th, 2012, 3:32 am

Code highlighting on the forum

Active Colors » October 19th, 2018, 10:34 am

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

Re: Code highlighting on the forum

jsmorley » October 19th, 2018, 1:09 pm

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.