generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
feat!!: Disallow mixing delimiter types in Boolean queries #2762
Merged
Conversation
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
It now checks the first delimiter on the line is the same type as the last one.
This reduces the number of scenarios in which we will accidentally treat a character in the filter as a delimiter. For example, it fixes this filter: (description includes "hello world") OR (description includes "42") Since the documentation discouraged use of " as a delimiter, it is unlikely to break any/many real-world searches - but it is a breaking change.
claremacrae
added
the
scope: query logic
Boolean combinations of filters - and, or, not
label
Apr 9, 2024
claremacrae
added a commit
that referenced
this pull request
Apr 9, 2024
5 tasks
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.
Description
Disallow the mixing of
(...)
and"..."
delimiters in Boolean queries.This reduces the number of scenarios in which we will accidentally treat a character in the filter as a delimiter.
Since the documentation discouraged use of " as a delimiter, it is unlikely to break any/many real-world searches - but it is a breaking change.
Note: more improvements are coming so I am not updating the documentation yet.
Example change
This mixture used to be allowed:
It now gives the error:
Example benefit
For example, it fixes this filter, where previously the closing
"
was wrongly interpreted:This query used to give:
It now works, giving this explanation:
Motivation and Context
Reduce the number of pitfalls in Boolean queries.
How has this been tested?
Types of changes
Changes visible to users:
feat!!
orfix!!
- fix or feature that would cause existing functionality to not work as expected)docs
- improvements to any documentation content for users)Contributing to Tasks)
Internal changes:
refactor
- non-breaking change which only improves the design or structure of existing code, and making no changes to its external behaviour)test
- additions and improvements to unit tests and the smoke tests)Checklist
yarn run lint
.Terms