lib/rouge/lexers/diff.rb in rouge-0.4.0 vs lib/rouge/lexers/diff.rb in rouge-0.5.0

- old
+ new

@@ -14,20 +14,20 @@ return 0.9 if text =~ /\A---.*?\n\+\+\+/m end state :header do - rule /^diff .*?\n(?=---|\+\+\+)/m, 'Generic.Heading' - rule /^--- .*?\n/, 'Generic.Deleted' - rule /^\+\+\+ .*?\n/, 'Generic.Inserted' + rule /^diff .*?\n(?=---|\+\+\+)/m, Generic::Heading + rule /^--- .*?\n/, Generic::Deleted + rule /^\+\+\+ .*?\n/, Generic::Inserted end state :diff do - rule /@@ -\d+,\d+ \+\d+,\d+ @@.*?\n/, 'Generic.Heading' - rule /^\+.*?\n/, 'Generic.Inserted' - rule /^-.*?\n/, 'Generic.Deleted' - rule /^ .*?\n/, 'Text' - rule /^.*?\n/, 'Error' + rule /@@ -\d+,\d+ \+\d+,\d+ @@.*?\n/, Generic::Heading + rule /^\+.*?\n/, Generic::Inserted + rule /^-.*?\n/, Generic::Deleted + rule /^ .*?\n/, Text + rule /^.*?\n/, Error end state :root do mixin :header mixin :diff