mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Sass] Don't bother checking the encoding of the template in SCSS::Parser.
This encoding should be checked at the higher-level entry points, Sass::Engine and Sass::CSS.
This commit is contained in:
parent
01521c030e
commit
1a2b7cb62f
1 changed files with 4 additions and 5 deletions
|
@ -6,7 +6,9 @@ module Sass
|
|||
# The parser for SCSS.
|
||||
# It parses a string of code into a tree of {Sass::Tree::Node}s.
|
||||
class Parser
|
||||
# @param str [String, StringScanner] The source document to parse
|
||||
# @param str [String, StringScanner] The source document to parse.
|
||||
# Note that `Parser` *won't* raise a nice error message if this isn't properly parsed;
|
||||
# for that, you should use the higher-level {Sass::Engine} or {Sass::CSS}.
|
||||
# @param line [Fixnum] The line on which the source string appeared,
|
||||
# if it's part of another document
|
||||
def initialize(str, line = 1)
|
||||
|
@ -46,10 +48,7 @@ module Sass
|
|||
if @template.is_a?(StringScanner)
|
||||
@template
|
||||
else
|
||||
StringScanner.new(
|
||||
Haml::Util.check_encoding(@template) do |msg, line|
|
||||
raise Sass::SyntaxError.new(msg, :line => line)
|
||||
end.gsub("\r", ""))
|
||||
StringScanner.new(@template.gsub("\r", ""))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue