Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
e160cdd9
Commit
e160cdd9
authored
Dec 23, 2020
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add isExternalURL
parent
a7465b56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
compiler-imports.js
apps/remix-ide/src/app/compiler/compiler-imports.js
+10
-1
No files found.
apps/remix-ide/src/app/compiler/compiler-imports.js
View file @
e160cdd9
...
@@ -14,7 +14,7 @@ const profile = {
...
@@ -14,7 +14,7 @@ const profile = {
name
:
'contentImport'
,
name
:
'contentImport'
,
displayName
:
'content import'
,
displayName
:
'content import'
,
version
:
packageJson
.
version
,
version
:
packageJson
.
version
,
methods
:
[
'resolve'
,
'resolveAndSave'
]
methods
:
[
'resolve'
,
'resolveAndSave'
,
'isExternalUrl'
]
}
}
module
.
exports
=
class
CompilerImports
extends
Plugin
{
module
.
exports
=
class
CompilerImports
extends
Plugin
{
...
@@ -105,6 +105,15 @@ module.exports = class CompilerImports extends Plugin {
...
@@ -105,6 +105,15 @@ module.exports = class CompilerImports extends Plugin {
return
/^
([^/]
+
)
/
.
exec
(
url
)
return
/^
([^/]
+
)
/
.
exec
(
url
)
}
}
isExternalUrl
(
url
)
{
for
(
const
handler
of
this
.
handlers
())
{
if
(
handler
.
match
.
exec
(
url
))
{
return
true
}
}
return
false
}
/**
/**
* resolve the content of @arg url. This only resolves external URLs.
* resolve the content of @arg url. This only resolves external URLs.
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment