[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need Help with defining highlight definition


Le 18/07/2025 à 19:45, Benoît Minisini a écrit :
Le 16/07/2025 à 19:49, Brian G a écrit :
Submitted merge request for two items, allow caseless matches in the texhighlighter, and fixed bug in theme load to allow .../

Added TextHighligher extension @ignorecase <true|false> so it can be placed into the highlighter file where needed.

Also updated the highlighter.highlighter to highlight the @ignorecase directive.

I hope this is acceptable!


Hi,

Something disturbs me in your merge request.

You made 'ignore case' a global option of the highlighter, whereas it makes sense only in the 'word', 'symbol' and 'keyword' commands.

For me, it should be an option for these commands only.

So it would just be a matter of finding a new syntax to indicate that the command is case unsensitive.

I suggest adding the ability to pass options to any command that way:

     command(option,option...)

and then just implementing 'keyword(ignorecase)'.

What do you think?


I have just committed the ability to add options to command.

The list of options is sent to the 'Init()' method of the command class. You will just have to modify your merge request with that test:

If aOptions.Exist("ignorecase") Then ...

Regards,

--
Benoît Minisini.


References:
Need Help with defining highlight definitionBrian G <brian@xxxxxxxxxxxxxxxx>
Re: Need Help with defining highlight definitionBrian G <brian@xxxxxxxxxxxxxxxx>
Re: Need Help with defining highlight definitionBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Need Help with defining highlight definitionBrian G <brian@xxxxxxxxxxxxxxxx>
Re: Need Help with defining highlight definitionBrian G <brian@xxxxxxxxxxxxxxxx>
Re: Need Help with defining highlight definitionBrian G <brian@xxxxxxxxxxxxxxxx>
Re: Need Help with defining highlight definitionBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>