lib/rouge/lexers/sass.rb in rouge-3.0.0 vs lib/rouge/lexers/sass.rb in rouge-3.1.0
- old
+ new
@@ -21,11 +21,11 @@
rule(/[ \t]*/) { |m| token Text; indentation(m[0]) }
end
state :content do
# block comments
- rule %r(//.*?\n) do
+ rule %r(//.*?$) do
token Comment::Single
pop!; starts_block :single_comment
end
rule %r(/[*].*?\n) do
@@ -40,16 +40,16 @@
rule %r(=#{id}), Name::Function, :value
rule %r([+]#{id}), Name::Decorator, :value
rule /:/, Name::Attribute, :old_style_attr
- rule(/(?=.+?:([^a-z]|$))/) { push :attribute }
+ rule(/(?=[^\[\n]+?:([^a-z]|$))/) { push :attribute }
rule(//) { push :selector }
end
state :single_comment do
- rule /.*?\n/, Comment::Single, :pop!
+ rule /.*?$/, Comment::Single, :pop!
end
state :multi_comment do
rule /.*?\n/, Comment::Multiline, :pop!
end