Sha256: 86e91e121fa81c46e6416e5b81ff27c84bf31e0010fce245b285dba30c98a30c

Contents?: true

Size: 726 Bytes

Versions: 5

Compression:

Stored size: 726 Bytes

Contents

module Rouge
  module Lexers
    load_const :SassCommon, 'sass/common.rb'

    class Scss < SassCommon
      desc "SCSS stylesheets (sass-lang.com)"
      tag 'scss'
      filenames '*.scss'
      mimetypes 'text/x-scss'

      state :root do
        rule /\s+/, Text
        rule %r(//.*?\n), Comment::Single
        rule %r(/[*].*?[*]/)m, Comment::Multiline
        rule /@import\b/, Keyword, :value

        mixin :content_common

        rule(/(?=[^;{}][;}])/) { push :attribute }
        rule(/(?=[^;{}:]+:[^a-z])/) { push :attribute }

        rule(//) { push :selector }
      end

      state :end_section do
        rule /\n/, Text
        rule(/[;{}]/) { token Punctuation; reset_stack }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rouge-1.5.0 lib/rouge/lexers/scss.rb
rouge-1.4.0 lib/rouge/lexers/scss.rb
rouge-1.3.4 lib/rouge/lexers/scss.rb
rouge-1.3.3 lib/rouge/lexers/scss.rb
rouge-1.3.2 lib/rouge/lexers/scss.rb