summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/diff.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2011-09-09 00:48:50 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2011-09-09 00:48:50 +0200
commitb256ecf98a6f2d15519c75ecb2ee53b8d4492ba9 (patch)
tree446d35af6f57c89e0139821c9f3dbc3531bb1349 /lib/coderay/scanners/diff.rb
parentb91d633948be6c4b16ac44038ab4657442eb3982 (diff)
downloadcoderay-b256ecf98a6f2d15519c75ecb2ee53b8d4492ba9.tar.gz
diff scanner: highlight "\ No newline" as :comment
Diffstat (limited to 'lib/coderay/scanners/diff.rb')
-rw-r--r--lib/coderay/scanners/diff.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/coderay/scanners/diff.rb b/lib/coderay/scanners/diff.rb
index 34eb158..fd70016 100644
--- a/lib/coderay/scanners/diff.rb
+++ b/lib/coderay/scanners/diff.rb
@@ -69,11 +69,8 @@ module Scanners
next unless match = scan(/.+/)
encoder.text_token match, :plain
state = :added
- elsif match = scan(/\\ /)
- encoder.begin_line line_kind = :change
- encoder.text_token match, :change
- next unless match = scan(/.+/)
- encoder.text_token match, :plain
+ elsif match = scan(/\\ .*/)
+ encoder.text_token match, :comment
elsif match = scan(/@@(?>[^@\n]*)@@/)
content_scanner.state = :initial unless match?(/\n\+/)
content_scanner_entry_state = nil