haml 3.0.9 → 3.0.10

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of haml might be problematic. Click here for more details.

data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.9
1
+ 3.0.10
@@ -4,7 +4,7 @@
4
4
 
5
5
  ;; Author: Nathan Weizenbaum
6
6
  ;; URL: http://github.com/nex3/haml/tree/master
7
- ;; Version: 3.0.0
7
+ ;; Version: 3.0.10
8
8
  ;; Created: 2007-03-08
9
9
  ;; By: Nathan Weizenbaum
10
10
  ;; Keywords: markup, language, html
@@ -136,7 +136,8 @@ and `font-lock-syntactic-keywords', respectively."
136
136
 
137
137
  (defun haml-fontify-region-as-ruby (beg end)
138
138
  "Use Ruby's font-lock variables to fontify the region between BEG and END."
139
- (haml-fontify-region beg end ruby-font-lock-keywords nil
139
+ (haml-fontify-region beg end ruby-font-lock-keywords
140
+ ruby-font-lock-syntax-table
140
141
  ruby-font-lock-syntactic-keywords))
141
142
 
142
143
  (defun haml-handle-filter (filter-name limit fn)
@@ -4,11 +4,11 @@
4
4
 
5
5
  ;; Author: Nathan Weizenbaum
6
6
  ;; URL: http://github.com/nex3/haml/tree/master
7
- ;; Version: 3.0.0
7
+ ;; Version: 3.0.10
8
8
  ;; Created: 2007-03-15
9
9
  ;; By: Nathan Weizenbaum
10
10
  ;; Keywords: markup, language, css
11
- ;; Package-Requires: ((haml-mode "3.0.0"))
11
+ ;; Package-Requires: ((haml-mode "3.0.10"))
12
12
 
13
13
  ;;; Commentary:
14
14
 
@@ -710,6 +710,8 @@ END
710
710
  end
711
711
  @options[:output] ||= @options[:input]
712
712
 
713
+ from = @options[:from]
714
+ from = :sass if from == :sass2
713
715
  if @options[:to] == @options[:from] && !@options[:in_place]
714
716
  fmt = @options[:from]
715
717
  raise "Error: converting from #{fmt} to #{fmt} without --in-place"
@@ -221,7 +221,7 @@ module Haml
221
221
  if content.include?("\n")
222
222
  "#{tabulate(tabs)}/#{condition}\n#{parse_text(content, tabs + 1)}"
223
223
  else
224
- "#{tabulate(tabs)}/#{condition} #{content.strip}"
224
+ "#{tabulate(tabs)}/#{condition} #{content.strip}\n"
225
225
  end
226
226
  end
227
227
  end
@@ -3,5 +3,5 @@ module Haml
3
3
  # This may be overridden by the package manager
4
4
  # if the lib directory is separated from the main source tree.
5
5
  # @api public
6
- ROOT_DIR = File.expand_path("../../..", __FILE__)
6
+ ROOT_DIR = File.expand_path(File.join(__FILE__, "../../.."))
7
7
  end
@@ -12,7 +12,7 @@ unless defined?(Sass::RAILS_LOADED)
12
12
  if defined?(ActionController::Metal)
13
13
  # Rails >= 3.0
14
14
  require 'sass/plugin/rack'
15
- ActionController::Metal.use(Sass::Plugin::Rack)
15
+ Rails.configuration.middleware.use(Sass::Plugin::Rack)
16
16
  elsif defined?(ActionController::Dispatcher) &&
17
17
  defined?(ActionController::Dispatcher.middleware)
18
18
  # Rails >= 2.3
@@ -86,6 +86,13 @@ HTML
86
86
 
87
87
  def test_inline_comment
88
88
  assert_equal("/ foo", render("<!-- foo -->"))
89
+ assert_equal(<<HAML.strip, render(<<HTML))
90
+ / foo
91
+ %p bar
92
+ HAML
93
+ <!-- foo -->
94
+ <p>bar</p>
95
+ HTML
89
96
  end
90
97
 
91
98
  def test_non_inline_comment
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 3
7
7
  - 0
8
- - 9
9
- version: 3.0.9
8
+ - 10
9
+ version: 3.0.10
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nathan Weizenbaum
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-06-01 00:00:00 -07:00
19
+ date: 2010-06-07 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency