anaisbetts / SassAndCoffee

SassAndCoffee adds support in ASP.NET MVC to (you guessed it!) Sass/SCSS and CoffeeScript
http://blog.paulbetts.org/index.php/2011/06/06/new-release-sassandcoffee-0-9-now-not-glacially-slow/
Microsoft Public License
199 stars 37 forks source link

Ruby Sass compiler chokes on Unicode characters in ASP.NET MVC 4 default stylesheet #63

Closed dylanbeattie closed 1 year ago

dylanbeattie commented 10 years ago

Taking my first steps with SassAndCoffee, I created a new ASP.NET MVC 4 Internet project, installed the NuGet package, renamed /Content/Site.css to /Content/Site.scss and ran the project. I got the following:

[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index]
    Microsoft.Scripting.Interpreter.ThrowInstruction.Run(InterpretedFrame frame) +156
    Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) +211
    Microsoft.Scripting.Interpreter.LightLambda.Run2(T0 arg0, T1 arg1) +276
    IronRuby.Runtime.Calls.RubyObjectMethodDispatcherWithScope.Invoke(CallSite callSite, TScope scope, Object self) +131
    Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame) +253
    Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) +211
    Microsoft.Scripting.Interpreter.LightLambda.Run2(T0 arg0, T1 arg1) +276
    IronRuby.Runtime.Calls.RubyObjectMethodDispatcherWithScope.Invoke(CallSite callSite, TScope scope, Object self) +131
    Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame) +253
    Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) +211
    Microsoft.Scripting.Interpreter.LightLambda.Run2(T0 arg0, T1 arg1) +276
    IronRuby.Runtime.Calls.RubyObjectMethodDispatcherWithScope.Invoke(CallSite callSite, TScope scope, Object self) +131
    Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame) +253
    Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) +211
    Microsoft.Scripting.Interpreter.LightLambda.Run4(T0 arg0, T1 arg1, T2 arg2, T3 arg3) +328
    SassAndCoffee.Ruby.Sass.SassCompiler.Compile(String path, Boolean compressed, IList`1 dependentFileList) +7510
    SassAndCoffee.Ruby.Sass.SassCompilerProxy.Compile(String path, Boolean compressed, IList`1 dependentFileList) +65
    SassAndCoffee.Ruby.Sass.SassCompilerContentTransform.Execute(ContentTransformState state) +268
    SassAndCoffee.Core.ContentPipeline.ProcessRequest(String physicalPath) +330
    SassAndCoffee.AspNet.PipelineHandler.ProcessRequest(HttpContext context) +215
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

This appears to be because there are extended Unicode characters in the site.css file that's included with the ASP.NET MVC project template.

Lines 572-578 are:

th.asc a:after {
    content: '▲';
}

th.desc a:after {
    content: '▼';
}

and I've verified that replacing the ▲▼ glyphs with regular ASCII characters fixes the problem.