mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 00:24:51 +00:00
improve(plugin): run internal plugin in isolated domain
This commit is contained in:
@@ -15,6 +15,9 @@ declare global {
|
||||
}
|
||||
|
||||
export const IS_DEV = process.env.NODE_ENV === 'development'
|
||||
export const PROTOCOL_FILE = 'file://'
|
||||
export const PROTOCOL_LSP = 'lsp://'
|
||||
export const URL_LSP = PROTOCOL_LSP + 'logseq.io/'
|
||||
|
||||
let _appPathRoot
|
||||
|
||||
@@ -98,7 +101,7 @@ export function ucFirst (str: string) {
|
||||
|
||||
export function withFileProtocol (path: string) {
|
||||
if (!path) return ''
|
||||
const reg = /^(http|file|assets)/
|
||||
const reg = /^(http|file|lsp)/
|
||||
|
||||
if (!reg.test(path)) {
|
||||
path = 'file://' + path
|
||||
|
||||
Reference in New Issue
Block a user