css2stylus 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/css2stylus +1 -1
  2. data/lib/css2stylus.rb +1 -1
  3. metadata +1 -1
data/bin/css2stylus CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- require 'css2stylus'
2
+ require_relative '../lib/css2stylus'
3
3
 
4
4
  file = File.basename(ARGV[0])
5
5
  filename = File.basename(file, File.extname(file))
data/lib/css2stylus.rb CHANGED
@@ -55,7 +55,7 @@ module Css2Stylus
55
55
  @stylus = @stylus + ' ' * indent + element + "\n"
56
56
  style = children.delete(:style)
57
57
  if style
58
- @stylus = @stylus + style.split(';').map { |s| s.strip }.reject { |s| s.empty? }.map { |s| ' ' * (indent + 2) + s.gsub(/:/, '') }.join("\n") + "\n"
58
+ @stylus = @stylus + style.split(';').map { |s| s.strip }.reject { |s| s.empty? }.map { |s| ' ' * (indent + 2) + s.gsub(/:(\s)*/, ' ') }.join("\n") + "\n"
59
59
  end
60
60
  render(children, indent + 2)
61
61
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: css2stylus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: