Skip to content

Commit 19fd2bf

Browse files
committed
Revert "Separate out deprecated import file extensions"
This reverts commit b9662fc.
1 parent 9a211eb commit 19fd2bf

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

src/file.cpp

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ namespace Sass {
323323
// (2) underscore + given
324324
// (3) underscore + given + extension
325325
// (4) given + extension
326-
std::vector<Include> resolve_includes(const std::string& root, const std::string& file, const std::vector<std::string>& exts, const std::vector<std::string>& d_exts)
326+
std::vector<Include> resolve_includes(const std::string& root, const std::string& file, const std::vector<std::string>& exts)
327327
{
328328
std::string filename = join_paths(root, file);
329329
// split the filename
@@ -350,18 +350,6 @@ namespace Sass {
350350
abs_path = join_paths(root, rel_path);
351351
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path });
352352
}
353-
// next test d_exts plus underscore
354-
for(auto ext : d_exts) {
355-
rel_path = join_paths(base, "_" + name + ext);
356-
abs_path = join_paths(root, rel_path);
357-
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path });
358-
}
359-
// next test plain name with d_exts
360-
for(auto ext : d_exts) {
361-
rel_path = join_paths(base, name + ext);
362-
abs_path = join_paths(root, rel_path);
363-
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path });
364-
}
365353
// nothing found
366354
return includes;
367355
}

src/file.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,10 @@ namespace Sass {
121121

122122
namespace File {
123123

124-
static std::vector<std::string> defaultExtensions = { ".scss", ".sass" };
125-
static std::vector<std::string> deprecatedExtensions = { ".css" };
124+
static std::vector<std::string> defaultExtensions = { ".scss", ".sass", ".css" };
126125

127126
std::vector<Include> resolve_includes(const std::string& root, const std::string& file,
128-
const std::vector<std::string>& exts = defaultExtensions,
129-
const std::vector<std::string>& d_exts = deprecatedExtensions);
127+
const std::vector<std::string>& exts = defaultExtensions);
130128

131129
}
132130

0 commit comments

Comments
 (0)