mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +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) {
|
handlelinkClick (e) {
|
||||||
const noteHash = e.target.hash
|
const noteHash = e.target.href.split('/').pop()
|
||||||
const regexIsNoteLink = /^#(.{20})-(.{20})$/
|
const regexIsNoteLink = /^(.{20})-(.{20})$/
|
||||||
if (regexIsNoteLink.test(noteHash)) {
|
if (regexIsNoteLink.test(noteHash)) {
|
||||||
eventEmitter.emit('list:jump', noteHash.replace(/^#/, ''))
|
eventEmitter.emit('list:jump', noteHash)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user