Zxynine / EvenBetterComments

My take on the better-comments extension which incorporates many pull requests and multi tag definitions
https://marketplace.visualstudio.com/items?itemName=Tion.evenbettercomments
MIT License
11 stars 1 forks source link

Prefix style tags no longer work. #9

Open Zxynine opened 1 year ago

Zxynine commented 1 year ago

The issue is that now the match is only made for exactly the value set as the tag and never more if someone wanted to highlight a line like:

// ==================

But only had the tag set as "===" then it would fail because it is requiring them to use it like:

// === ===============

To get the highlighting.

I think that this problem actually was removed only partially because of me setting the separators to space or colon, I removed a little bit in the parser that was actually matching for any number of tags in a row, so something like

//TodoTodoTodo: Some comment stuff

Was also matching and so combined with a more strict setting for a separator between the tag and comment, the functionality was removed. This is also tricky to implement with how tags are currently found, I may be able to add in an option that lets you match for the last character repeated.

@Fred-Vatin: in this I suggest to add a property "isPrefix": boolean to process those kind of tags.

Zxynine commented 1 year ago

This bug is turning out to be far more of a pain in the ass then I had thought it would be. I will be implementing a simplified form of Regex tags eventually which may solve this, but they will cost some (depending on how many you have) performance. I may add in an option to have the parser work like how it did before but it would have to be global (not tag specific) if i do.