From 19fd2bf2e31413b5935e7feb87fec630b486feba Mon Sep 17 00:00:00 2001 From: xzyfer Date: Mon, 2 Jul 2018 21:11:20 +1000 Subject: [PATCH] Revert "Separate out deprecated import file extensions" This reverts commit b9662fc5b16d8dc985d2077a471d0aa0ee8f8c7f. --- src/file.cpp | 14 +------------- src/file.hpp | 6 ++---- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/file.cpp b/src/file.cpp index 46973057a..32d4a7c63 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -323,7 +323,7 @@ namespace Sass { // (2) underscore + given // (3) underscore + given + extension // (4) given + extension - std::vector resolve_includes(const std::string& root, const std::string& file, const std::vector& exts, const std::vector& d_exts) + std::vector resolve_includes(const std::string& root, const std::string& file, const std::vector& exts) { std::string filename = join_paths(root, file); // split the filename @@ -350,18 +350,6 @@ namespace Sass { abs_path = join_paths(root, rel_path); if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path }); } - // next test d_exts plus underscore - for(auto ext : d_exts) { - rel_path = join_paths(base, "_" + name + ext); - abs_path = join_paths(root, rel_path); - if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path }); - } - // next test plain name with d_exts - for(auto ext : d_exts) { - rel_path = join_paths(base, name + ext); - abs_path = join_paths(root, rel_path); - if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path }); - } // nothing found return includes; } diff --git a/src/file.hpp b/src/file.hpp index 759996fa8..279b9e9f6 100644 --- a/src/file.hpp +++ b/src/file.hpp @@ -121,12 +121,10 @@ namespace Sass { namespace File { - static std::vector defaultExtensions = { ".scss", ".sass" }; - static std::vector deprecatedExtensions = { ".css" }; + static std::vector defaultExtensions = { ".scss", ".sass", ".css" }; std::vector resolve_includes(const std::string& root, const std::string& file, - const std::vector& exts = defaultExtensions, - const std::vector& d_exts = deprecatedExtensions); + const std::vector& exts = defaultExtensions); }