clutcher / bh

Issue tracker for Better Highlights Intellij IDEA plugin
7 stars 0 forks source link

Tokens made from series of special characters doesn't work #17

Closed dadiborn closed 2 years ago

dadiborn commented 2 years ago

I wanted to make three comment tokens using '>' character like so:

Worked only solo version, two+ accepted but doesn't set/change any color in comments section of my TypeScript file.

P.S. And Huge Thanks for continuing to support this plugin and making fantastic improvements in it!

clutcher commented 2 years ago

Looks like because of overlapping symbols. I'll think how to fix without decreasing performance.

iMobCoding commented 2 years ago

+1 for this one

Maybe add one more type like COMMENT KEYWORD so when you parse comments you first search for keywords (by removing all white spaces after the comment and checking for starting keyword) and if that fails you proceed with regular COMMENT parsing. Maybe that wouldn't degrade performance so much?

clutcher commented 2 years ago

Found a way to deal with that. On configuration saving we will persist tokens sorted by length desc.

After plugin update you would need to modify token list, so the configuration would be saved with sorting.

2021-11-29_11-40-19