Page 1 of 1

FIXED? Code Explorer Module section bugs in CSS

Posted: 27 May 2023 14:08
by pjj
1) Please do not strip leading dot nor hash, so it is at once recognizable if an entry is a class, id, or tag (additionally using colors for different types would be great, too).

2) Parsing rules probably need some tweaking: of these three on the screenshot below only .three is recognized as a [P]roperty:
parsing declarations.png
parsing declarations.png (5.32 KiB) Viewed 1932 times
Btw. it's not a property, it's a selector:
css-declaration-small.png
css-declaration-small.png (12.74 KiB) Viewed 1932 times
3) if there are two selectors on consecutive lines, only one (the first) is recognized and listed:
two selectors.png
two selectors.png (4.71 KiB) Viewed 1932 times
4) @ rules are recognized, but not selectors inside them.

...A crazy (?) idea. Since I understand you use regex to parse/reparse (some) files for collecting Modules, perhaps these rules could be placed in separate files (per highlighter) and read during program start, and users could tweak them to their needs? I'm assuming these is technically feasible and not that complicated, and that the benefits could be noticeable. Plus this would be a step in the right direction of opening RJ TE (not the source, mind you, but the program as a coding environment).

Re: Code Explorer Module section bugs in CSS

Posted: 30 May 2023 16:38
by Rickard Johansson
Fixed most in v15.90 beta 2.

Some things can not easily be changed.
  • Selectors on multiple lines are not collected and displayed. The editor doesn't know what a selector is or how must to collect. In some languages - collecting everything before { could result a very large string.
  • Elements inside { } are not collected and displayed. For that kind of detail use a language server and the document symbols panel.