lib/rouge/lexers/qml.rb in rouge-1.5.0 vs lib/rouge/lexers/qml.rb in rouge-1.5.1
- old
+ new
@@ -1,5 +1,7 @@
+# -*- coding: utf-8 -*- #
+
module Rouge
module Lexers
load_const :Javascript, 'javascript.rb'
class Qml < Javascript
desc 'QML, a UI markup language'
@@ -19,10 +21,10 @@
rule /(#{id_with_dots})(\s+)(on)(\s+)(#{id_with_dots})(\s*)({)/ do
groups Keyword::Type, Text, Keyword, Text, Name::Label, Text, Punctuation
push :type_block
end
end
-
+
state :type_block do
rule /(id)(\s*)(:)(\s*)(#{id_with_dots})/ do
groups Name::Label, Text, Punctuation, Text, Keyword::Declaration
end