Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
d3730b07
Commit
d3730b07
authored
Sep 09, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix highlighting of deleted lines in diffs.
parent
e0da2c35
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
CHANGELOG
CHANGELOG
+1
-0
config/initializers/rouge_diff_lexer.rb
config/initializers/rouge_diff_lexer.rb
+24
-0
No files found.
CHANGELOG
View file @
d3730b07
...
@@ -40,6 +40,7 @@ v 8.0.0 (unreleased)
...
@@ -40,6 +40,7 @@ v 8.0.0 (unreleased)
- Add ability to get user information by ID of an SSH key via the API
- Add ability to get user information by ID of an SSH key via the API
- Fix bug which IE cannot show image at markdown when the image is raw file of gitlab
- Fix bug which IE cannot show image at markdown when the image is raw file of gitlab
- Add support for Crowd
- Add support for Crowd
- Fix highlighting of deleted lines in diffs.
v 7.14.1
v 7.14.1
- Improve abuse reports management from admin area
- Improve abuse reports management from admin area
...
...
config/initializers/rouge_diff_lexer.rb
0 → 100644
View file @
d3730b07
# Here until https://github.com/jneen/rouge/pull/297 is merged into Rouge and the gem is updated in GitLab.
module
Rouge
module
Lexers
class
Diff
def
self
.
analyze_text
(
text
)
return
1
if
text
.
start_with?
(
'Index: '
)
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
)
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment