Fix quote matching in meeting name search#31
Open
sblack4 wants to merge 2 commits into
Open
Conversation
Transform search queries to match both straight and curly quote variants using character classes in regex patterns. This fixes issue #28 where searching "Joe's Place" wouldn't match "Joe's Place" in the database. Implementation: - Add makeQuoteFlexibleRegex() to escape special chars and convert quotes to character classes (e.g., "Joe's" → "Joe['']s") - Update pipelineFromQuery to use the new function for nameQuery - Add test cases for quote handling and regex escaping No database changes required. Works with existing data. Fixes code4recovery/oiaa-direct#28
Keep inline regex explanations, drop JSDoc and standalone comments.
tim-rohrer
approved these changes
Mar 4, 2026
Collaborator
tim-rohrer
left a comment
There was a problem hiding this comment.
Any idea why the version in package-lock.json updated? Not that it is wrong, but it seems odd that some contributions lead to the file being updated, and others don't.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes code4recovery/oiaa-direct#28
Problem
Search doesn't match meeting names when the only difference is between straight quotes (
"or') and curly quotes (""or''). For example, searching for "Joe's Place" wouldn't match "Joe's Place" in the database.Solution
Transform search queries to match both straight and curly quote variants using character classes in regex patterns.
Implementation
makeQuoteFlexibleRegex()function that:Joe's→Joe['']s)pipelineFromQueryto transformnameQuerybefore regex matchingExample
Joe's(straight apostrophe)Joe['']sJoe's(straight) andJoe's(curly) ✓Benefits
Testing