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

Merge pull request #697 from asmsuechan/remove-sharp-from-hash

Remove sharp from note hash on list:jump
This commit is contained in:
SuenagaRyota
2017-07-10 16:43:02 +09:00
committed by GitHub

View File

@@ -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)
}
}