sassc 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/ext/libsass/Readme.md +1 -1
- data/ext/libsass/ast.cpp +264 -0
- data/ext/libsass/ast.hpp +52 -133
- data/ext/libsass/bind.cpp +23 -1
- data/ext/libsass/constants.cpp +3 -1
- data/ext/libsass/constants.hpp +3 -0
- data/ext/libsass/context.cpp +0 -1
- data/ext/libsass/debugger.hpp +84 -2
- data/ext/libsass/error_handling.cpp +14 -4
- data/ext/libsass/error_handling.hpp +3 -0
- data/ext/libsass/eval.cpp +44 -14
- data/ext/libsass/functions.cpp +37 -37
- data/ext/libsass/functions.hpp +0 -2
- data/ext/libsass/inspect.cpp +9 -2
- data/ext/libsass/output.cpp +7 -14
- data/ext/libsass/output.hpp +1 -2
- data/ext/libsass/parser.cpp +16 -4
- data/ext/libsass/position.hpp +5 -0
- data/ext/libsass/prelexer.cpp +5 -1
- data/ext/libsass/sass_values.cpp +15 -0
- data/ext/libsass/sass_values.h +3 -0
- data/ext/libsass/util.cpp +63 -7
- data/ext/libsass/util.hpp +2 -0
- data/lib/sassc/engine.rb +2 -0
- data/lib/sassc/native.rb +1 -1
- data/lib/sassc/version.rb +1 -1
- data/test/engine_test.rb +7 -0
- data/test/native_test.rb +10 -1
- metadata +2 -2
data/ext/libsass/util.hpp
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#ifndef SASS_UTIL_H
|
2
2
|
#define SASS_UTIL_H
|
3
3
|
|
4
|
+
#include <cstdio>
|
4
5
|
#include <vector>
|
5
6
|
#include <string>
|
6
7
|
#include "ast_fwd_decl.hpp"
|
@@ -12,6 +13,7 @@ namespace Sass {
|
|
12
13
|
double sass_atof(const char* str);
|
13
14
|
string string_escape(const string& str);
|
14
15
|
string string_unescape(const string& str);
|
16
|
+
string string_eval_escapes(const string& str);
|
15
17
|
string read_css_string(const string& str);
|
16
18
|
string evacuate_quotes(const string& str);
|
17
19
|
string evacuate_escapes(const string& str);
|
data/lib/sassc/engine.rb
CHANGED
data/lib/sassc/native.rb
CHANGED
data/lib/sassc/version.rb
CHANGED
data/test/engine_test.rb
CHANGED
@@ -117,5 +117,12 @@ CSS
|
|
117
117
|
assert_equal css, Engine.new(sass, syntax: "sass").render
|
118
118
|
assert_raises(SyntaxError) { Engine.new(sass).render }
|
119
119
|
end
|
120
|
+
|
121
|
+
def test_encoding_matches_input
|
122
|
+
input = "$size: 30px;"
|
123
|
+
input.force_encoding("UTF-8")
|
124
|
+
output = Engine.new(input).render
|
125
|
+
assert_equal input.encoding, output.encoding
|
126
|
+
end
|
120
127
|
end
|
121
128
|
end
|
data/test/native_test.rb
CHANGED
@@ -3,12 +3,13 @@ require_relative "test_helper"
|
|
3
3
|
module SassC
|
4
4
|
module NativeTest
|
5
5
|
SAMPLE_SASS_STRING = "$size: 30px; .hi { width: $size; }"
|
6
|
+
SPECIAL_SASS_STRING = "$sißßßßßße: 30px; .hßß©i { width: $size; }"
|
6
7
|
SAMPLE_CSS_OUTPUT = ".hi {\n width: 30px; }\n"
|
7
8
|
BAD_SASS_STRING = "$size = 30px;"
|
8
9
|
|
9
10
|
class General < MiniTest::Test
|
10
11
|
def test_it_reports_the_libsass_version
|
11
|
-
assert_equal "3.2.
|
12
|
+
assert_equal "3.2.2", Native.version
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
@@ -48,6 +49,14 @@ module SassC
|
|
48
49
|
refute_equal 0, status
|
49
50
|
end
|
50
51
|
|
52
|
+
def test_multibyte_characters_work
|
53
|
+
@data_context = Native.make_data_context(SPECIAL_SASS_STRING)
|
54
|
+
context = Native.data_context_get_context(@data_context)
|
55
|
+
|
56
|
+
status = Native.compile_data_context(@data_context)
|
57
|
+
refute_equal 0, status
|
58
|
+
end
|
59
|
+
|
51
60
|
def test_failed_compile_gives_error_message
|
52
61
|
end
|
53
62
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sassc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Boland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|