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
f304f975
Commit
f304f975
authored
Jan 27, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix blob multiline highlight
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
78b2fb5d
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
8 deletions
+32
-8
app/assets/javascripts/blob.js.coffee
app/assets/javascripts/blob.js.coffee
+1
-1
app/assets/javascripts/dispatcher.js.coffee
app/assets/javascripts/dispatcher.js.coffee
+8
-0
app/assets/javascripts/main.js.coffee
app/assets/javascripts/main.js.coffee
+0
-3
app/assets/stylesheets/generic/highlight.scss
app/assets/stylesheets/generic/highlight.scss
+5
-0
app/assets/stylesheets/highlight/dark.scss
app/assets/stylesheets/highlight/dark.scss
+4
-1
app/assets/stylesheets/highlight/monokai.scss
app/assets/stylesheets/highlight/monokai.scss
+5
-1
app/assets/stylesheets/highlight/solarized_dark.scss
app/assets/stylesheets/highlight/solarized_dark.scss
+4
-1
app/assets/stylesheets/highlight/white.scss
app/assets/stylesheets/highlight/white.scss
+5
-1
No files found.
app/assets/javascripts/blob.js.coffee
View file @
f304f975
...
...
@@ -64,7 +64,7 @@ class BlobView
nodes
.
attr
(
"id"
,
hash
)
# initialize multi-line select
$
(
"#tree-content-holder .line
_
numbers a[id^=L]"
).
on
(
"click"
,
handleMultiSelect
)
$
(
"#tree-content-holder .line
-
numbers a[id^=L]"
).
on
(
"click"
,
handleMultiSelect
)
# Highlight the correct lines on load
highlightBlobLines
()
...
...
app/assets/javascripts/dispatcher.js.coffee
View file @
f304f975
...
...
@@ -4,6 +4,7 @@ $ ->
class
Dispatcher
constructor
:
()
->
@
initSearch
()
@
initHighlight
()
@
initPageScripts
()
initPageScripts
:
->
...
...
@@ -53,3 +54,10 @@ class Dispatcher
project_ref
=
opts
.
data
(
'autocomplete-project-ref'
)
new
SearchAutocomplete
(
path
,
project_id
,
project_ref
)
initHighlight
:
->
$
(
'pre code'
).
each
(
i
,
e
)
->
hljs
.
highlightBlock
(
e
)
$
(
e
).
html
(
$
.
map
(
$
(
e
).
html
().
split
(
"
\n
"
),
(
line
,
i
)
->
"<div class='line' id='LC"
+
(
i
+
1
)
+
"'>"
+
line
+
"</div>"
).
join
(
"
\n
"
))
app/assets/javascripts/main.js.coffee
View file @
f304f975
...
...
@@ -56,9 +56,6 @@ document.addEventListener("page:fetch", unbindEvents)
document
.
addEventListener
(
"page:change"
,
stopSpinner
)
$
->
$
(
'pre code'
).
each
(
i
,
e
)
->
hljs
.
highlightBlock
(
e
)
# Click a .one_click_select field, select the contents
$
(
".one_click_select"
).
on
'click'
,
->
$
(
@
).
select
()
...
...
app/assets/stylesheets/generic/highlight.scss
View file @
f304f975
...
...
@@ -16,6 +16,11 @@
code
{
white-space
:
pre
;
word-wrap
:
normal
;
padding
:
0
;
.line
{
display
:
inline
;
}
}
}
...
...
app/assets/stylesheets/highlight/dark.scss
View file @
f304f975
.dark
{
background-color
:
#232323
;
.line.hll
{
background
:
#558
;
}
.highlight
{
border-left
:
1px
solid
#444
;
}
...
...
@@ -15,7 +19,6 @@
.hljs
{
display
:
block
;
padding
:
0
.5em
;
background
:
#232323
;
color
:
#E6E1DC
;
}
...
...
app/assets/stylesheets/highlight/monokai.scss
View file @
f304f975
...
...
@@ -5,6 +5,10 @@
border-left
:
1px
solid
#444
;
}
.line.hll
{
background
:
#558
;
}
.line-numbers
a
{
color
:
#666
;
}
...
...
@@ -15,7 +19,7 @@
}
.hljs
{
display
:
block
;
padding
:
0
.5em
;
display
:
block
;
background
:
#272822
;
}
...
...
app/assets/stylesheets/highlight/solarized_dark.scss
View file @
f304f975
...
...
@@ -5,6 +5,10 @@
border-left
:
1px
solid
#113b46
;
}
.line.hll
{
background
:
#000
;
}
pre
{
background-color
:
#002B36
;
color
:
#eee
;
...
...
@@ -16,7 +20,6 @@
.hljs
{
display
:
block
;
padding
:
0
.5em
;
background
:
#002b36
;
color
:
#839496
;
}
...
...
app/assets/stylesheets/highlight/white.scss
View file @
f304f975
.white
{
background-color
:
#fff
;
.line.hll
{
background
:
#FFA
;
}
.highlight
{
border-left
:
1px
solid
#eee
;
}
...
...
@@ -19,7 +23,7 @@
}
.hljs
{
display
:
block
;
padding
:
0
.5em
;
display
:
block
;
background
:
#fff
;
color
:
black
;
}
...
...
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