Skip to content

Commit f88405f

Browse files
committed
Merge pull request #78 from Erwhann-Rouge/sass_quickfix
Added rules to discover `.sass` files when compiling directories
2 parents 91dd2ab + 18699d6 commit f88405f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/changes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Version 0.8.3
66

77
To be released.
88

9+
- Fixed a bug that :file:`*.sass` files were ignored.
10+
[:issue:`78` by Guilhem MAS-PAITRAULT]
11+
912

1013
Version 0.8.2
1114
-------------

sass.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,14 @@ def compile_dirname(
150150
for dirpath, _, filenames in os.walk(search_path):
151151
filenames = [
152152
filename for filename in filenames
153-
if filename.endswith('.scss') and not filename.startswith('_')
153+
if filename.endswith(('.scss', '.sass'))
154+
and not filename.startswith('_')
154155
]
155156
for filename in filenames:
156157
input_filename = os.path.join(dirpath, filename)
157158
relpath_to_file = os.path.relpath(input_filename, search_path)
158159
output_filename = os.path.join(output_path, relpath_to_file)
159-
output_filename = re.sub('.scss$', '.css', output_filename)
160+
output_filename = re.sub('.s[ac]ss$', '.css', output_filename)
160161
input_filename = input_filename.encode(fs_encoding)
161162
s, v, _ = compile_filename(
162163
input_filename, output_style, source_comments, include_paths,

0 commit comments

Comments
 (0)