File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -158,14 +158,14 @@ def sass_configs
158158
159159 def convert ( content )
160160 output = ::Sass . compile_string ( content , **sass_configs )
161- result = + " #{ output . css } \n "
161+ result = output . css
162162
163163 if sourcemap_required?
164164 source_map = process_source_map ( output . source_map )
165165 generate_source_map_page ( source_map )
166166
167167 if ( sm_url = source_mapping_url )
168- result << " \n /*# sourceMappingURL=#{ sm_url } */"
168+ result += " #{ sass_style == :compressed ? "" : " \n \n " } /*# sourceMappingURL=#{ sm_url } */"
169169 end
170170 end
171171
Original file line number Diff line number Diff line change 2222 end
2323
2424 let ( :expanded_css_output ) do
25- <<~CSS
25+ <<~CSS . chomp
2626 body {
2727 font-family: Helvetica, sans-serif;
2828 font-color: fuschia;
@@ -67,13 +67,13 @@ def converter(overrides = {})
6767 it "does not include the charset without an associated page" do
6868 overrides = { "style" => :expanded }
6969 result = converter ( overrides ) . convert ( %(a\n content: "あ") )
70- expect ( result ) . to eql ( %(a {\n content: "あ";\n }\n ) )
70+ expect ( result ) . to eql ( %(a {\n content: "あ";\n }) )
7171 end
7272
7373 it "does not include the BOM without an associated page" do
7474 overrides = { "style" => :compressed }
7575 result = converter ( overrides ) . convert ( %(a\n content: "あ") )
76- expect ( result ) . to eql ( %(a{content:"あ"}\n ) )
76+ expect ( result ) . to eql ( %(a{content:"あ"}) )
7777 expect ( result . bytes . to_a [ 0 ..2 ] ) . not_to eql ( [ 0xEF , 0xBB , 0xBF ] )
7878 end
7979 end
Original file line number Diff line number Diff line change 2323 end
2424
2525 let ( :expanded_css_output ) do
26- <<~CSS
26+ <<~CSS . chomp
2727 body {
2828 font-family: Helvetica, sans-serif;
2929 font-color: fuschia;
@@ -135,13 +135,13 @@ def converter(overrides = {})
135135 it "does not include the charset without an associated page" do
136136 overrides = { "style" => :expanded }
137137 result = converter ( overrides ) . convert ( %(a{content:"あ"}) )
138- expect ( result ) . to eql ( %(a {\n content: "あ";\n }\n ) )
138+ expect ( result ) . to eql ( %(a {\n content: "あ";\n }) )
139139 end
140140
141141 it "does not include the BOM without an associated page" do
142142 overrides = { "style" => :compressed }
143143 result = converter ( overrides ) . convert ( %(a{content:"あ"}) )
144- expect ( result ) . to eql ( %(a{content:"あ"}\n ) )
144+ expect ( result ) . to eql ( %(a{content:"あ"}) )
145145 expect ( result . bytes . to_a [ 0 ..2 ] ) . not_to eql ( [ 0xEF , 0xBB , 0xBF ] )
146146 end
147147 end
@@ -156,7 +156,7 @@ def converter(overrides = {})
156156
157157 it "imports SCSS partial" do
158158 expect ( File . read ( test_css_file ) ) . to eql (
159- ".half{width:50%}\n \n /*# sourceMappingURL=main.css.map */"
159+ ".half{width:50%}/*# sourceMappingURL=main.css.map */"
160160 )
161161 end
162162
You can’t perform that action at this time.
0 commit comments