mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
@@ -395,6 +395,9 @@ export default class MarkdownPreview extends React.Component {
|
||||
|
||||
_.forEach(this.refs.root.contentWindow.document.querySelectorAll('a'), (el) => {
|
||||
this.fixDecodedURI(el)
|
||||
el.href = this.markdown.normalizeLinkText(el.href)
|
||||
if (!/\/:storage/.test(el.href)) return
|
||||
el.href = `file:///${this.markdown.normalizeLinkText(path.join(storagePath, 'images', path.basename(el.href)))}`
|
||||
el.addEventListener('click', this.anchorClickHandler)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user