Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Use only the stylesheets with the correct endings. #50

Merged
merged 1 commit into from

4 participants

Roman Simecek Caleb Thompson Yu-Cheng Chuang Ben Schwarz
Roman Simecek

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

Roman Simecek 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
Caleb Thompson

image file in the stylesheets folder.

Found the error.

Roman Simecek

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

Yu-Cheng Chuang

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.

Ben Schwarz
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.

Ben Schwarz
Collaborator

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

Ben Schwarz benschwarz merged commit e743087 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 27, 2012
  1. Roman Simecek

    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
2  lib/kss/parser.rb
View
@@ -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.