lib/sass/scss/parser.rb in haml-3.0.22 vs lib/sass/scss/parser.rb in haml-3.0.23

- old
+ new

@@ -96,11 +96,12 @@ comment = Sass::Tree::CommentNode.new(pre_str + text, single_line) comment.line = @line - text.count("\n") node << comment end - DIRECTIVES = Set[:mixin, :include, :debug, :warn, :for, :while, :if, :extend, :import, :media] + DIRECTIVES = Set[:mixin, :include, :debug, :warn, :for, :while, :if, :extend, :import, + :media, :charset] def directive return unless tok(/@/) name = tok!(IDENT) ss @@ -285,9 +286,16 @@ end tok!(/\)/) ss true + end + + def charset_directive + tok! STRING + name = @scanner[1] || @scanner[2] + ss + node(Sass::Tree::CharsetNode.new(name)) end def variable return unless tok(/\$/) name = tok!(IDENT)