You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the report. I can confirm there's an issue. It looks like the appropriate offset for the start of the actual match (ok in th is case) is not being added to the index of the yml element. I think this will be an easy fix.
Fixes#511.
AI was not appropriately adjusting the Index of the pattern match by the index of the yaml element like it did for XML and JSON.
Adds a new test case to ensure the index matched is correct using sample from the linked bug.
Fixed coded and tests are running on the PR now. I've added a better test case based on your bug report sample to ensure that the Index of the found match is correct going forward.
* Fix#511Fixes#511.
AI was not appropriately adjusting the Index of the pattern match by the index of the yaml element like it did for XML and JSON.
Adds a new test case to ensure the index matched is correct using sample from the linked bug.
* Support multiple Yaml documents in a single file.
Check all documents listed in the stream rather than just the first.
Describe the bug
Using a rule with yamlpath, the excerpt returned inside match is always the beginning of the file.
To Reproduce
With file:
Using rule:
The match returned:
Note that "test:\n test1:\n - something\n - other\n" doesn't even contains the matched string.
Expected behavior
As with the other rules, the excerpt should contains the matched string, and lines before and after the match.
Operating Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: