cloudhead-less 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.1
1
+ 0.8.2
data/less.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{less}
5
- s.version = "0.8.0"
5
+ s.version = "0.8.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["cloudhead"]
data/lib/less/command.rb CHANGED
@@ -18,7 +18,7 @@ module Less
18
18
  exit 0
19
19
  end
20
20
  end
21
-
21
+
22
22
  def run!
23
23
  if watch?
24
24
  log "Watching for changes in #@source ...Ctrl-C to abort.\n"
@@ -32,7 +32,7 @@ module Less
32
32
  log "Change detected... "
33
33
 
34
34
  # Loop until error is fixed
35
- while not compile
35
+ until compile
36
36
  log "Press [enter] to continue..."
37
37
  watch { $stdin.gets }
38
38
  end
data/lib/less/engine.rb CHANGED
@@ -6,12 +6,12 @@ module Less
6
6
  :variable => /@([-\w]+)/, # @milk-white
7
7
  :property => /@[-\w]+|[-a-z]+/ # font-size
8
8
  }
9
-
9
+
10
10
  def initialize s
11
11
  super
12
12
  @tree = Tree.new self.hashify
13
13
  end
14
-
14
+
15
15
  def compile
16
16
  #
17
17
  # Parse the variables and mixins
@@ -61,7 +61,7 @@ module Less
61
61
  #
62
62
  # Units are: 1px, 1em, 1%, #111
63
63
  @tree = @tree.traverse :leaf do |key, value, path, node|
64
- if value.match /[-+\/*]/
64
+ if value =~ /(\s?)[-+\/*](\1)/
65
65
  if (unit = value.scan(/(%)|\d+(px)|\d+(em)|(#)/i).flatten.compact.uniq).size <= 1
66
66
  unit = unit.join
67
67
  value = if unit == '#'
data/spec/spec.less CHANGED
@@ -17,6 +17,7 @@ lala
17
17
  @fi: @fa;
18
18
  @fa: grey;
19
19
  color: .alt > @base-color - .alt > @base-color;
20
+ margin: 10px -10px 4px 2px;
20
21
  line-height: 1999px;
21
22
  .blah {
22
23
  .bloop {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudhead-less
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - cloudhead