Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion extra_scripts/codemirror/addon/hyperlink/hyperlink.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@

if (className.indexOf('cm-url') !== -1) {
const match = /^\((.*)\)|\[(.*)\]|(.*)$/.exec(el.textContent)
return match[1] || match[2] || match[3]
const url = match[1] || match[2] || match[3]
return /^:storage\//.test(url) ? null : url
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mind to use attachmentManagement.STORAGE_FOLDER_PLACEHOLDER instead of hard-coding :storage here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ehhc it's not possible
require('../browser/main/lib/dataApi/attachmentManagement') throws the error Cannot find module 'browser/lib/findStorage'

hyperlink.js is loaded by Chromium
attachmentManagement.js is written to be loaded by node

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it is really not possible (i am not a nodejs/electron pro, so i'm not sure about that) could you at least add an comment pointing to that file? That would help a lot in case somebody will refactor it again (e.g. in a few years..)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ehhc sure, I can do that

}

return null
Expand Down