Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
816020f0
Commit
816020f0
authored
Jul 10, 2012
by
Elliott Sales de Andrade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Search through include paths when looking for imports.
parent
569baeef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
document_parser.cpp
document_parser.cpp
+4
-5
No files found.
document_parser.cpp
View file @
816020f0
...
@@ -101,17 +101,16 @@ namespace Sass {
...
@@ -101,17 +101,16 @@ namespace Sass {
if
(
!
lex
<
string_constant
>
())
throw_syntax_error
(
"@import directive requires a url or quoted path"
);
if
(
!
lex
<
string_constant
>
())
throw_syntax_error
(
"@import directive requires a url or quoted path"
);
// TO DO: BETTER PATH HANDLING
// TO DO: BETTER PATH HANDLING
string
import_path
(
lexed
.
unquote
());
string
import_path
(
lexed
.
unquote
());
const
char
*
curr_path_start
=
path
.
c_str
();
for
(
vector
<
string
>::
iterator
path
=
context
.
include_paths
.
begin
();
path
<
context
.
include_paths
.
end
();
++
path
)
{
const
char
*
curr_path_end
=
folders
(
curr_path_start
);
string
current_path
(
curr_path_start
,
curr_path_end
-
curr_path_start
);
try
{
try
{
Document
importee
(
Document
::
make_from_file
(
context
,
current_
path
+
import_path
));
Document
importee
(
Document
::
make_from_file
(
context
,
*
path
+
import_path
));
importee
.
parse_scss
();
importee
.
parse_scss
();
return
importee
.
root
;
return
importee
.
root
;
}
}
catch
(
string
&
path
)
{
catch
(
string
&
path
)
{
throw_read_error
(
"error reading file
\"
"
+
path
+
"
\"
"
);
}
}
}
throw_read_error
(
"error reading file
\"
"
+
import_path
+
"
\"
"
);
// unreached statement
// unreached statement
return
Node
();
return
Node
();
}
}
...
...
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