Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Use only the stylesheets with the correct endings. #50

Merged
merged 1 commit into from

4 participants

@raskhadafi

I had an error who was caused by an image file in the stylesheets folder.

@raskhadafi raskhadafi Use only the stylesheets with the correct endings.
I had an error who was caused by an image file in the stylesheets folder.
2ef26a5
@calebthompson

image file in the stylesheets folder.

Found the error.

@raskhadafi

What about a merge?
The gem would be more stable.

@chitsaou

I got "invalid byte sequence in UTF-8" exception until I found it was caused by binary files in stylesheets/ (got answer here: dewski/kss-rails#14).

This patch is definitely useful to me.

@benschwarz
Collaborator

@raskhadafi — Why don't you add an image or some invalid file to the test suite? That way the change is documented as actually fixing something, rather than tweaking a random path.

@benschwarz
Collaborator

I've added an example image to the test suite.
Merging.

@benschwarz benschwarz merged commit e743087 into kneath:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 27, 2012
  1. @raskhadafi

    Use only the stylesheets with the correct endings.

    raskhadafi authored
    I had an error who was caused by an image file in the stylesheets folder.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/kss/parser.rb
View
2  lib/kss/parser.rb
@@ -15,7 +15,7 @@ def initialize(*paths)
@sections = {}
paths.each do |path|
- Dir["#{path}/**/*.*"].each do |filename|
+ Dir["#{path}/**/*.{css,less,sass,scss}"].each do |filename|
parser = CommentParser.new(filename)
parser.blocks.each do |comment_block|
add_section comment_block, filename if self.class.kss_block?(comment_block)
Something went wrong with that request. Please try again.