-
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endless loop in findPartialMatches, azure plugin code #610
Comments
Hi @jweingarten-rv 👋 Thank you for this report and the detailed analysis! What's your expected outcome, given your input data? |
Hi @s1hofmann, well I actually was thinking about that as well a bit. To me the The person that wrote the test, that uncovered the issue would most likely expect that But does that imply that in case of a One option could be to add more options. In conjunction with In my specific use case, I can go either way and make the test pass. Specifically its selecting a menu and I just added the |
Hi @jweingarten-rv 👋 I have now fixed your reported bug in both After careful consideration I decided against any additional parameters to make search more flexible. Snapshot releases are already available, stable releases will follow! Best regards Simon |
Thanks @s1hofmann. |
@jweingarten-rv |
Fix confirmed. Thank you! |
Version
Short overview
While upgrading
plugin-azure
from version 1 to2.1.0
we are running into an endless loop that boils down to a bug in findPartialMatches,js in@nut-tree\plugin-azure\dist\ocr\stringQueryProcessing.function.js
.node version:
v20.11.0
OS type and version:
Windows / Mac
Detailed error description
Full code sample to reproduce
While upgrading
plugin-azure
from version 1 to2.1.0
we are running into an endless loop that boils down to a bug infindPartialMatches
in@nut-tree\plugin-azure\dist\ocr\stringQueryProcessing.function.js
.During execution the function
findPartialMatches
is called with the following parameters:line.text:
Edit Actions: Clear All
line.words: ['
Edit', 'Actions:', 'Clear', 'All']
config:
{partialMatch: true}
searchWords:
['edit', 'action']
pm:
[]
Note that the line has
Edit Actions:
and we are searching foredit actions
, nocolon
in the search.When it loops through the code it ends up in
That will reset
idx
back to0
and you are in an endless loop.Here is a fix, not pretty and most likely not how you will fix it, that I am currently using so that I can stay on version
2.1.0
:Additional content
The text was updated successfully, but these errors were encountered: