I am having issues with the method 'getWordRangeAtPostition' of TextDocument. The problem is that the regex added as second argument is not respected.
This is my code:
const wordRange = editor.document.getWordRangeAtPosition(selection.active, /[a-zA-Z0-9_[[:space:]]]*/);
Using this example:
"bla bla bla bla"
To my understanding, the four words should be selected, as the [[:space:]] regex indicates that spaces are part of words. But the behaviour is the same than without the regex (only 1 word is selected).
I am having issues with the method 'getWordRangeAtPostition' of TextDocument. The problem is that the regex added as second argument is not respected.
This is my code:
const wordRange = editor.document.getWordRangeAtPosition(selection.active, /[a-zA-Z0-9_[[:space:]]]*/);Using this example:
"bla bla bla bla"To my understanding, the four words should be selected, as the [[:space:]] regex indicates that spaces are part of words. But the behaviour is the same than without the regex (only 1 word is selected).