1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

fix spacings

This commit is contained in:
Sosuke Suzuki
2017-05-31 20:52:36 +09:00
parent 290e6ab170
commit 9496ab88f7

View File

@@ -1,6 +1,6 @@
import _ from 'lodash'
export default function searchFromNotes(data, search){
export default function searchFromNotes (data, search) {
let notes = data.noteMap.map((note) => note)
if (search.trim().length === 0) return []
let searchBlocks = search.split(' ')
@@ -14,7 +14,7 @@ export default function searchFromNotes(data, search){
return notes
}
function findByTag(notes, block){
function findByTag (notes, block) {
const tag = block.match(/#(.+)/)[1]
let regExp = new RegExp(_.escapeRegExp(tag), 'i')
return notes.filter((note) => {
@@ -25,7 +25,7 @@ function findByTag(notes, block){
})
}
function findByWord(notes, block){
function findByWord (notes, block) {
let regExp = new RegExp(_.escapeRegExp(block), 'i')
return notes.filter((note) => {
if (_.isArray(note.tags) && note.tags.some((_tag) => {