1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00
Commit Graph

16 Commits

Author SHA1 Message Date
Sosuke Suzuki
0d53f799b7 to short an arrow function 2018-04-10 18:40:57 +09:00
bimlas
4f9a0b0040 Merge findByTag() and findByWord() into one
Both looked for word in tags and content too, the only difference is
when searched for `#tag`, the prefix (`#`) was truncated before compared
with list of tags.
2018-03-20 19:30:57 +01:00
bimlas
aae584106a Look for tags in context too
The previous commit broke this behaviour.

Looking for a tag means the union of **tags** AND **tag in content**, so
it has to search in the in currently found notes separetely, thus it has
to clone the list first (`.slice(0)`).
2018-03-20 17:11:08 +01:00
bimlas
5f5a7880a6 Fix tag filtering in search entry
Some issues introduced in #954
(https://github.com/BoostIO/Boostnote/pull/954#issuecomment-336344915):

- search by `#tag1 #tag2` returns the results of only `#tag2`
- search by `#tag1 content` is as same as AND search by `#tag1 content` (and
  `#tag1` is regarded a word, not a tag)
- search by `content #tag1` returns the results of only `#tag1`

This commit fixing these:

- search by `#tag1 #tag2` returns the results of only `#tag2`

  ![screencast](https://i.imgur.com/SjhQIhl.gif)

- search by `#tag1 content` is as same as AND search by `#tag1 content` (and
  `#tag1` is regarded a word, not a tag)

  ![screencast](https://i.imgur.com/G0Tmd8c.gif)

- search by `content #tag1` returns the results of only `#tag1`

  ![screencast](https://i.imgur.com/5MrMbE6.gif)

NOTE: the examples works without `#` character too, because
`findByWord()` checks the tags too.
2018-03-20 09:01:11 +01:00
Maurits Lourens
3fbc749395 fixed eslint warnings 2017-11-24 17:00:03 +01:00
asmsuechan
7ab482184b Improve tag search by changing the logic 2017-10-13 11:40:10 +09:00
asmsuechan
caa5deac4e Change searching by tag 2017-10-13 10:37:43 +09:00
asmsuechan
6987b762dd Make context-search work 2017-08-05 22:23:33 +09:00
Sosuke Suzuki
9496ab88f7 fix spacings 2017-05-31 20:52:36 +09:00
Sosuke Suzuki
290e6ab170 change arg findByTag 2017-05-31 20:49:34 +09:00
Sosuke Suzuki
fc4c471a87 fix spacing for eslint 2017-05-31 00:30:55 +09:00
Sosuke Suzuki
805c39e60c refactor search function 2017-05-30 22:16:27 +09:00
Sosuke Suzuki
2364348df4 fix indent 2017-05-30 18:49:39 +09:00
Sosuke Suzuki
e643443660 split search function to module. 2017-05-30 18:27:57 +09:00
Dick Choi
60daafe136 clean lib 2016-05-25 17:07:41 +09:00
Rokt33r
325ae00eeb refactor file structure 2015-12-25 05:41:10 +09:00