lib/rouge/lexers/diff.rb in rouge-1.10.1 vs lib/rouge/lexers/diff.rb in rouge-1.11.0

- old
+ new

@@ -14,18 +14,18 @@ return 1 if text.start_with?('diff ') return 0.9 if text.start_with?('--- ') end state :root do - rule(/^ .*\n/, Text) - rule(/^---\n/, Text) - rule(/^\+.*\n/, Generic::Inserted) - rule(/^-+.*\n/, Generic::Deleted) - rule(/^!.*\n/, Generic::Strong) - rule(/^@.*\n/, Generic::Subheading) - rule(/^([Ii]ndex|diff).*\n/, Generic::Heading) - rule(/^=.*\n/, Generic::Heading) - rule(/.*\n/, Text) + rule(/^ .*$\n?/, Text) + rule(/^---$\n?/, Text) + rule(/^\+.*$\n?/, Generic::Inserted) + rule(/^-+.*$\n?/, Generic::Deleted) + rule(/^!.*$\n?/, Generic::Strong) + rule(/^@.*$\n?/, Generic::Subheading) + rule(/^([Ii]ndex|diff).*$\n?/, Generic::Heading) + rule(/^=.*$\n?/, Generic::Heading) + rule(/.*$\n?/, Text) end end end end