haml-edge 2.1.1 → 2.1.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/EDGE_GEM_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/haml/shared.rb +5 -3
- metadata +1 -1
data/EDGE_GEM_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.2
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.2
|
data/lib/haml/shared.rb
CHANGED
@@ -4,13 +4,15 @@ require 'strscan'
|
|
4
4
|
module Haml
|
5
5
|
# This module contains functionality that's shared across Haml and Sass.
|
6
6
|
module Shared
|
7
|
-
|
7
|
+
extend self
|
8
|
+
|
9
|
+
def handle_interpolation(str)
|
8
10
|
scan = StringScanner.new(str)
|
9
11
|
yield scan while scan.scan(/(.*?)(\\*)\#\{/)
|
10
12
|
scan.rest
|
11
13
|
end
|
12
14
|
|
13
|
-
def
|
15
|
+
def balance(scanner, start, finish, count = 0)
|
14
16
|
str = ''
|
15
17
|
scanner = StringScanner.new(scanner) unless scanner.is_a? StringScanner
|
16
18
|
regexp = Regexp.new("(.*?)[\\#{start.chr}\\#{finish.chr}]", Regexp::MULTILINE)
|
@@ -22,7 +24,7 @@ module Haml
|
|
22
24
|
end
|
23
25
|
end
|
24
26
|
|
25
|
-
def
|
27
|
+
def human_indentation(indentation, was = false)
|
26
28
|
if !indentation.include?(?\t)
|
27
29
|
noun = 'space'
|
28
30
|
elsif !indentation.include?(?\s)
|