-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make substring match algorithm case insensitive (#1056)
Fixes #860 <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Make substring match algorithm case insensitive and update tests for boolean, enum, and literal string matches. > > - **Behavior**: > - Make substring match algorithm case insensitive by converting strings to lowercase in `coerce_primitive.rs` and `match_string.rs`. > - Fix boolean coercion in `coerce_bool()` to handle case-insensitive matches for "true" and "false". > - **Tests**: > - Add tests in `test_basics.rs` for case-insensitive boolean matches and handling of text around boolean values. > - Add tests in `test_enum.rs` for case-insensitive enum matches and handling of text around enum values. > - Add tests in `test_literals.rs` for case-insensitive literal string matches and handling of text around literal values. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup> for ef5be3c. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
- Loading branch information
1 parent
f09d943
commit fa2c477
Showing
5 changed files
with
139 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters