mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Separate active tags by instead of &
Using `&` to separate tags in path (like `/tags/currently&selected&tags`) may interfer with tags including `&` character (like `black&white`). Since ` ` is replaced with `_` when adding tag to notes, it's ideal separator because it's guaranteed that tags are not including this character.
This commit is contained in:
@@ -343,7 +343,7 @@ class NoteList extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (location.pathname.match(/\/tags/)) {
|
if (location.pathname.match(/\/tags/)) {
|
||||||
const listOfTags = params.tagname.split('&')
|
const listOfTags = params.tagname.split(' ')
|
||||||
return data.noteMap.map(note => {
|
return data.noteMap.map(note => {
|
||||||
return note
|
return note
|
||||||
}).filter(note => {
|
}).filter(note => {
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ class SideNav extends React.Component {
|
|||||||
if (tags === 'alltags') {
|
if (tags === 'alltags') {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
return tags.split('&')
|
return tags.split(' ')
|
||||||
}
|
}
|
||||||
|
|
||||||
handleClickTagListItem (name) {
|
handleClickTagListItem (name) {
|
||||||
@@ -229,7 +229,7 @@ class SideNav extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
listOfTags.push(name)
|
listOfTags.push(name)
|
||||||
}
|
}
|
||||||
router.push(`/tags/${listOfTags.join('&')}`)
|
router.push(`/tags/${listOfTags.join(' ')}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
emptyTrash (entries) {
|
emptyTrash (entries) {
|
||||||
|
|||||||
Reference in New Issue
Block a user