File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ defaults:
35
35
36
36
common:
37
37
coderay file.rb # highlight file to terminal
38
- coderay file.rb > file.html # highlight file to HTML page
38
+ coderay file.rb -page > file.html # highlight file to HTML page
39
39
coderay file.rb -div > file.html # highlight file to HTML snippet
40
40
41
41
configure output:
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ def scan_tokens encoder, options
100
100
next
101
101
elsif match = scan ( /-/ )
102
102
deleted_lines_count += 1
103
- if options [ :inline_diff ] && deleted_lines_count == 1 && ( changed_lines_count = 1 + check ( /.*(?:\n \- .*)*/ ) . count ( "\n " ) ) && match? ( /(?>.*(?:\n \- .*){#{ changed_lines_count - 1 } }(?:\n \+ .*){#{ changed_lines_count } })$(?!\n \+ )/ )
103
+ if options [ :inline_diff ] && deleted_lines_count == 1 && ( changed_lines_count = 1 + check ( /.*(?:\n \- .*)*/ ) . count ( "\n " ) ) && changed_lines_count <= 100_000 && match? ( /(?>.*(?:\n \- .*){#{ changed_lines_count - 1 } }(?:\n \+ .*){#{ changed_lines_count } })$(?!\n \+ )/ )
104
104
deleted_lines = Array . new ( changed_lines_count ) { |i | skip ( /\n \- / ) if i > 0 ; scan ( /.*/ ) }
105
105
inserted_lines = Array . new ( changed_lines_count ) { |i | skip ( /\n \+ / ) ; scan ( /.*/ ) }
106
106
You can’t perform that action at this time.
0 commit comments