cloudhead-less 1.2.2 → 1.2.3

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
- 1.2.2
1
+ 1.2.3
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 = "1.2.2"
5
+ s.version = "1.2.3"
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/ext.rb CHANGED
@@ -3,13 +3,19 @@ module Treetop
3
3
  class CompiledParser
4
4
  def failure_message
5
5
  return nil unless (tf = terminal_failures) && tf.size > 0
6
- "on line #{failure_line}: expected " + (
6
+ msg = "on line #{failure_line}: expected " + (
7
7
  tf.size == 1 ?
8
- tf[0].expected_string :
8
+ Less::YELLOW[tf[0].expected_string] :
9
9
  "one of #{Less::YELLOW[tf.map {|f| f.expected_string }.uniq * ' ']}"
10
- ) +
11
- " got #{Less::YELLOW[input[failure_index].chr]}" +
12
- " after:\n\n#{input[index...failure_index]}\n"
10
+ )
11
+ f = input[failure_index]
12
+ got = case f
13
+ when "\n" then Less::CYAN['\n']
14
+ when nil then Less::CYAN["EOF"]
15
+ when ' ' then Less::CYAN["white-space"]
16
+ else Less::YELLOW[f.chr]
17
+ end
18
+ msg += " got #{got} after:\n\n#{input[index...failure_index]}\n"
13
19
  end
14
20
  end
15
21
  end
data/lib/less/command.rb CHANGED
@@ -5,6 +5,7 @@ module Less
5
5
  GREEN = lambda {|s| "#{ESC}[1;32m#{s}#{RESET}"}
6
6
  RED = lambda {|s| "#{ESC}[1;31m#{s}#{RESET}"}
7
7
  YELLOW = lambda {|s| "#{ESC}[1;33m#{s}#{RESET}"}
8
+ CYAN = lambda {|s| "#{ESC}[1;36m#{s}#{RESET}"}
8
9
  BOLD = lambda {|s| "#{ESC}[1m#{s}#{RESET}"}
9
10
 
10
11
  class Command
@@ -243,7 +243,7 @@ module Less
243
243
  # div / .class / #id / input[type="text"] / lang(fr)
244
244
  #
245
245
  rule element
246
- (class_id / tag / ident) attribute* ('(' ident? attribute* ')')? / attribute+ / '@media' / '@font-face'
246
+ (class_id / tag / ident) attribute* ('(' selector ')')? / attribute+ / '@media' / '@font-face'
247
247
  end
248
248
 
249
249
  rule class_id
data/spec/css/css-3.css CHANGED
@@ -9,5 +9,6 @@
9
9
  }
10
10
  .other { -moz-transform: translate(0, 11em) rotate(-90deg); }
11
11
  p:not([class*="lead"]) { color: black; }
12
+ ul.comma > li:not(:only-child)::after { color: white; }
12
13
  a[href^="http://"], a[href$="http://"] { color: black; }
13
14
  p::before { color: black; }
data/spec/less/css-3.less CHANGED
@@ -16,6 +16,10 @@ p:not([class*="lead"]) {
16
16
  color: black;
17
17
  }
18
18
 
19
+ ul.comma > li:not(:only-child)::after {
20
+ color: white;
21
+ }
22
+
19
23
  a[href^="http://"] {
20
24
  color: black;
21
25
  }
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: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - cloudhead
@@ -190,6 +190,7 @@ files:
190
190
  - spec/spec_helper.rb
191
191
  has_rdoc: false
192
192
  homepage: http://www.lesscss.org
193
+ licenses:
193
194
  post_install_message:
194
195
  rdoc_options:
195
196
  - --charset=UTF-8
@@ -210,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
211
  requirements: []
211
212
 
212
213
  rubyforge_project: less
213
- rubygems_version: 1.2.0
214
+ rubygems_version: 1.3.5
214
215
  signing_key:
215
216
  specification_version: 3
216
217
  summary: LESS compiler