Skip to content

Commit

Permalink
fix: note不支持中文标签
Browse files Browse the repository at this point in the history
  • Loading branch information
glennliao committed Jul 15, 2023
1 parent cc4cc4e commit 11cd923
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/views/bookmark/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ if (route.query.url) {
<style scoped lang="scss">

.menu > li > div {
padding: 12px;
//padding: 12px;
}
.active {
border-bottom: 2px solid;
Expand Down
3 changes: 2 additions & 1 deletion ui/src/views/note/components/EditModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ function handleAdd (next) {
"tag":"Note"
}

const tagReg = /#(\w+)/g
const tagReg = /#([^#\s]+)/g

const tags = new Set((markdownText.match(tagReg)||[]).map(item=>item.slice(1)))

param.Note.tags = Array.from(tags)


if (_info.noteId) {
api = apiJson.put
param.Note.noteId = _info.noteId
Expand Down

0 comments on commit 11cd923

Please sign in to comment.