mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
* core: fix quoted & repeated tag/color filters in search query * fix extra quotes being added for multi word tag/color filter * fix multiple tag/color filters not working Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com> * core: prevent db.lookup.notesWithHighlighting from mutating the passed in selector The FilteredSelector passed into notesWithHighlighting was being mutated. This wasn't an issue in the apps/web because a fresh selector was passed in for every query. But on apps/mobile, the same selector is reused for every query on the search page. The bug only became apparent when passing in a query like `tag:one`, then after the results came in, continuing the query: `tag:one tag:two`. This only showed results from tag:one since the selector was mutated by the previous lookup. The mutation happens in FilteredSelector's where method. So, the bug is fixed by cloning the selector before the where method call in notesWithHighlighting. Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com> --------- Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
Notesnook Core
The shared core for building Notesnook on any platform.
Developer guide | How to build? | Run the tests
Build instructions
Before you start it is recommended that you read the contributing guidelines.
Setting up the development environment
Requirements:
Before you can do anything, you'll need to install Node.js on your system.
Once you have completed the setup, the first step is to clone the monorepo:
git clone https://github.com/streetwriters/notesnook.git
# change directory
cd notesnook
Once you are inside the ./notesnook directory, run the preparation step:
# this might take a while to complete
npm install
And that's it. You can run the tests to make sure everything is working as it should:
npm run test:core
Developer guide
The tech stack
We try to keep the stack as lean as possible
- Javascript
- Jest: Testing framework
Running the tests
When you are done making the required changes, you need to run the tests. We use Jest as the testing framework & the tests can be run with a single command:
npm run test:core