diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2011-09-09 00:48:50 +0200 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2011-09-09 00:48:50 +0200 |
commit | b256ecf98a6f2d15519c75ecb2ee53b8d4492ba9 (patch) | |
tree | 446d35af6f57c89e0139821c9f3dbc3531bb1349 /lib/coderay | |
parent | b91d633948be6c4b16ac44038ab4657442eb3982 (diff) | |
download | coderay-b256ecf98a6f2d15519c75ecb2ee53b8d4492ba9.tar.gz |
diff scanner: highlight "\ No newline" as :comment
Diffstat (limited to 'lib/coderay')
-rw-r--r-- | lib/coderay/scanners/diff.rb | 7 |
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 |