cloudhead-less 1.0.1 → 1.0.2

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/Rakefile CHANGED
@@ -69,12 +69,12 @@ begin
69
69
  end
70
70
 
71
71
  task :benchmark do
72
- puts "benchmarking..."
72
+ print "benchmarking... "
73
73
  less = File.read("spec/less/big-1.0.less")
74
74
  start = Time.now.to_f
75
75
  Less::Engine.new(less).parse
76
76
  total = Time.now.to_f - start
77
- puts "total time: #{total}s"
77
+ puts "#{total}s"
78
78
  end
79
79
  end
80
80
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.2
data/less.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{less}
5
- s.version = "1.0.1"
5
+ s.version = "1.0.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["cloudhead"]
9
- s.date = %q{2009-07-09}
9
+ s.date = %q{2009-07-10}
10
10
  s.default_executable = %q{lessc}
11
11
  s.description = %q{LESS is leaner CSS}
12
12
  s.email = %q{self@cloudhead.net}
data/lib/less/engine.rb CHANGED
@@ -42,8 +42,7 @@ module Less
42
42
  alias :to_tree :parse
43
43
 
44
44
  def to_css
45
- "/* Generated with Less #{Less.version} */\n\n" +
46
- (@css || @css = self.parse.to_css)
45
+ @css || @css = self.parse.to_css
47
46
  end
48
47
 
49
48
  def prepare
@@ -354,6 +354,10 @@ grammar Less
354
354
  def build env
355
355
  Node::Anonymous.new text_value
356
356
  end
357
+ } / [-a-zA-Z0-9_%$/.&=:;#+?]+ {
358
+ def build env
359
+ Node::String.new text_value
360
+ end
357
361
  }
358
362
  end
359
363
 
@@ -3605,6 +3605,12 @@ module Less
3605
3605
  end
3606
3606
  end
3607
3607
 
3608
+ module Argument6
3609
+ def build env
3610
+ Node::String.new text_value
3611
+ end
3612
+ end
3613
+
3608
3614
  def _nt_argument
3609
3615
  start_index = index
3610
3616
  if node_cache[:argument].has_key?(index)
@@ -3689,8 +3695,33 @@ module Less
3689
3695
  if r6
3690
3696
  r0 = r6
3691
3697
  else
3692
- @index = i0
3693
- r0 = nil
3698
+ s11, i11 = [], index
3699
+ loop do
3700
+ if has_terminal?('[-a-zA-Z0-9_%$/.&=:;#+?]', true, index)
3701
+ r12 = true
3702
+ @index += 1
3703
+ else
3704
+ r12 = nil
3705
+ end
3706
+ if r12
3707
+ s11 << r12
3708
+ else
3709
+ break
3710
+ end
3711
+ end
3712
+ if s11.empty?
3713
+ @index = i11
3714
+ r11 = nil
3715
+ else
3716
+ r11 = instantiate_node(SyntaxNode,input, i11...index, s11)
3717
+ r11.extend(Argument6)
3718
+ end
3719
+ if r11
3720
+ r0 = r11
3721
+ else
3722
+ @index = i0
3723
+ r0 = nil
3724
+ end
3694
3725
  end
3695
3726
  end
3696
3727
  end
@@ -1,5 +1,3 @@
1
- /* Generated with Less 1.0.0 */
2
-
3
1
  .magic-box {
4
2
  content: "gold";
5
3
  width: 60cm;
data/spec/css/big-1.0.css CHANGED
@@ -1,5 +1,3 @@
1
- /* Generated with Less 1.0.0 */
2
-
3
1
  html { background: #1F9EC9; }
4
2
  #doc4 {
5
3
  color: #333333;
@@ -1,5 +1,3 @@
1
- /* Generated with Less 1.0.0 */
2
-
3
1
  #comments {
4
2
  color: red;
5
3
  background-color: orange;
data/spec/css/css-1.0.css CHANGED
@@ -1,5 +1,3 @@
1
- /* Generated with Less 1.0.0 */
2
-
3
1
  div { color: black; }
4
2
  div { width: 99%; }
5
3
  * { min-width: 45em; }
@@ -37,4 +35,5 @@ input[type="text"] { font-weight: normal; }
37
35
  .misc {
38
36
  -moz-border-radius: 2px;
39
37
  color: red !important;
38
+ background-image: url(images/image.jpg);
40
39
  }
@@ -1,5 +1,3 @@
1
- /* Generated with Less 1.0.0 */
2
-
3
1
  #functions {
4
2
  color: #999999;
5
3
  width: 16;
@@ -1,5 +1,3 @@
1
- /* Generated with Less 1.0.0 */
2
-
3
1
  #import { color: red; }
4
2
  .mixin {
5
3
  height: 10px;
@@ -1,5 +1,3 @@
1
- /* Generated with Less 1.0.0 */
2
-
3
1
  .mixin { border: 1px solid black; }
4
2
  .mixout { border-color: orange; }
5
3
  .borders { border-style: dashed; }
@@ -1,5 +1,3 @@
1
- /* Generated with Less 1.0.0 */
2
-
3
1
  #operations {
4
2
  color: #111111;
5
3
  height: 9px;
@@ -1,5 +1,3 @@
1
- /* Generated with Less 1.0.0 */
2
-
3
1
  #first > .one { font-size: 2em; }
4
2
  #first > .one > #second .two > #deux { width: 50%; }
5
3
  #first > .one > #second .two > #deux #third { height: 100%; }
@@ -1,5 +1,3 @@
1
- /* Generated with Less 1.0.0 */
2
-
3
1
  .tiny-scope {
4
2
  color: none;
5
3
  border-color: #989989;
@@ -1,5 +1,3 @@
1
- /* Generated with Less 1.0.0 */
2
-
3
1
  #strings {
4
2
  background-image: url("http://son-of-a-banana.com");
5
3
  quotes: "~" "~";
@@ -1,7 +1,6 @@
1
- /* Generated with Less 1.0.0 */
2
-
3
1
  .variables { width: 14cm; }
4
2
  .variables {
5
3
  height: 24px;
6
4
  color: #888888;
5
+ font-family: "Trebuchet MS", Verdana, sans-serif;
7
6
  }
@@ -1,5 +1,3 @@
1
- /* Generated with Less 1.0.0 */
2
-
3
1
  .whitespace { color: white; }
4
2
  .whitespace { color: white; }
5
3
  .whitespace { color: white; }
@@ -77,6 +77,7 @@ input[type="text"] {
77
77
  .misc {
78
78
  -moz-border-radius: 2px;
79
79
  color: red !important;
80
+ background-image: url(images/image.jpg);
80
81
  margin: ;
81
82
  }
82
83
 
@@ -0,0 +1,3 @@
1
+ #mixed-units-error {
2
+ color: 1px + #fff;
3
+ }
@@ -0,0 +1,3 @@
1
+ #name-error {
2
+ color: @var;
3
+ }
@@ -0,0 +1,3 @@
1
+ #syntax-error {
2
+ color: blue;;
3
+ }
@@ -9,8 +9,10 @@
9
9
 
10
10
  @b: @a * 10;
11
11
  @c: #888;
12
+ @fonts: "Trebuchet MS", Verdana, sans-serif;
12
13
 
13
14
  .variables {
14
15
  height: @b + @x + 0px; // 24px
15
16
  color: @c;
17
+ font-family: @fonts;
16
18
  }
data/spec/spec.css CHANGED
@@ -1,5 +1,3 @@
1
- /* Generated with Less 1.0.0 */
2
-
3
1
  .theme {
4
2
  color: #cccccc;
5
3
  background-color: #aaaaaa;
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.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - cloudhead
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-09 00:00:00 -07:00
12
+ date: 2009-07-10 00:00:00 -07:00
13
13
  default_executable: lessc
14
14
  dependencies: []
15
15