cloudhead-less 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/less.gemspec +1 -1
- data/lib/less/command.rb +2 -2
- data/lib/less/engine.rb +3 -3
- data/spec/spec.less +1 -0
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.2
|
data/less.gemspec
CHANGED
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
|
-
|
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
|
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