mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Remove sharp from note hash on list:jump
This commit is contained in:
@@ -384,10 +384,10 @@ export default class MarkdownPreview extends React.Component {
|
||||
}
|
||||
|
||||
handlelinkClick (e) {
|
||||
const noteHash = e.target.hash
|
||||
const regexIsNoteLink = /^#(.{20})-(.{20})$/
|
||||
const noteHash = e.target.href.split('/').pop()
|
||||
const regexIsNoteLink = /^(.{20})-(.{20})$/
|
||||
if (regexIsNoteLink.test(noteHash)) {
|
||||
eventEmitter.emit('list:jump', noteHash.replace(/^#/, ''))
|
||||
eventEmitter.emit('list:jump', noteHash)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user