Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,11 @@ class Comb {
let filename = options && options.filename || '';
let context = options && options.context;
let tree;
const lint = this.lint;

if (!text) return this.lint ? [] : text;
if (!text) return new Promise(function(resolve) {
resolve(lint ? [] : text);
});

if (!syntax) syntax = 'css';
this.syntax = syntax;
Expand Down
Empty file added test/core/scss/empty.scss
Empty file.
7 changes: 7 additions & 0 deletions test/core/scss/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ describe('scss', function() {
return test.shouldBeEqual('content.scss');
});

it('Should parse an empty file', function() {
let test = new Test(this);
test.comb.configure({});

return test.shouldBeEqual('empty.scss');
});

it('Should parse functions', function() {
let test = new Test(this);
test.comb.configure({});
Expand Down