Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

diff scanner: highlight "\ No newline" as :comment

  • Loading branch information...
commit b256ecf98a6f2d15519c75ecb2ee53b8d4492ba9 1 parent b91d633
@korny korny authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/coderay/scanners/diff.rb
View
7 lib/coderay/scanners/diff.rb
@@ -69,11 +69,8 @@ def scan_tokens encoder, options
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
Please sign in to comment.
Something went wrong with that request. Please try again.