tintinweb / vscode-inline-bookmarks

Customizable inline Bookmarks for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=tintinweb.vscode-inline-bookmarks
GNU General Public License v3.0
45 stars 14 forks source link

Request: Needs compatibility with Windows line endings #37

Closed fade2gray closed 2 years ago

fade2gray commented 3 years ago

Love this extension, but needs compatibility with Windows line endings.

e.g. @todo[ \t\r\n$]

tintinweb commented 3 years ago

Hi @fade2gray,

what effect does the missing \r have? Just curious as it should still match on the \n.

fade2gray commented 3 years ago

https://user-images.githubusercontent.com/1332009/129378080-eb065d00-6116-4539-88f6-ca175b4664b0.mp4

Also, I believe the character class, [ \t\n$], can be removed altogether and will function for both types of eol.

tintinweb commented 3 years ago

@fade2gray I cannot really reproduce this 🤔 Does changing the pattern to e.g. @todo[\s] or @todo[\W] fix it? The reason we added this is to match word boundaries or otherwise @audithii would match as well.

edit: @todo[\W] would also match @todo- which is not what we want.

fade2gray commented 3 years ago

Well, I discovered what was causing the behaviour I was getting, it was due to having the Todo Tree extension enabled at the same time.

...so, your original character class is fine, but why the (space and)\t and not just \s?

tintinweb commented 3 years ago

I remember having problems with \s back when I first published the extension (maybe that only affected windows). I'm testing it now for my instance. If it's working I may replace the sequence with just \s :)

thanks for the feedback 🙌