Wrong editor colors 3.0.6446

You have encountered a problem using Far Manager? Here you can get help.
Post Reply
ronwilson
Posts: 1
Joined: Sat 17 May, 2025 10:20

Wrong editor colors 3.0.6446

Post by ronwilson »

Hi! After updating from 3.0.6364 found out that internal editor shows wrong syntax highlighting in the JSON files with comments (example in attachment) - it was OK in 3.0.6364. Maybe some settings are exists to change behavior to old one? :smile:
Attachments
far-3.0.6446.png
far-3.0.6446.png (6.03 KiB) Viewed 560 times
far-3.0.6364.png
far-3.0.6364.png (6.01 KiB) Viewed 560 times
User avatar
ctapmex
Posts: 1268
Joined: Fri 11 Apr, 2008 07:53
Has thanked: 1 time
Been thanked: 58 times

Wrong editor colors 3.0.6446

Post by ctapmex »

comments of the form //… or // are not allowed in JSON. this check was made in the new version of the scheme.
The json format in your example is incorrect.
User avatar
HaRT
Moderator
Posts: 11275
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 252 times
Been thanked: 392 times

Wrong editor colors 3.0.6446

Post by HaRT »

ctapmex wrote: Sat 17 May, 2025 15:02 comments of the form //… or /…/ are not allowed in JSON. this check was made in the new version of the scheme.
The json format in your example is incorrect.
Formally, that's true. In practice, people do use comments in JSON config files a lot, and many JSON support libraries accept them either unconditionally or by an option.
Just to avoid yet another holy war, here's an old SO thread with all kind of opinions, also multiple discussions on Reddit.
IMHO it would be practical for the Colorer JSON scheme to have a parameter whether it should highlight JavaScript comments as a syntax error or as a comment.
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
ctapmex
Posts: 1268
Joined: Fri 11 Apr, 2008 07:53
Has thanked: 1 time
Been thanked: 58 times

Wrong editor colors 3.0.6446

Post by ctapmex »

reviewed the changes. Perhaps the comments started to glow as an error by accident, because they are displayed correctly at the beginning of the file. Fixed it, in the new night version or here https://github.com/colorer/Colorer-sche ... /v1.2.0.71
Post Reply

Return to “Support and Troubleshooting”