BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
55dc7d09
Commit
55dc7d09
authored
Jun 15, 2016
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trim more dead code
parent
504a048b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
18 deletions
+3
-18
html_gitlab.rb
lib/rouge/formatters/html_gitlab.rb
+3
-18
No files found.
lib/rouge/formatters/html_gitlab.rb
View file @
55dc7d09
...
@@ -57,10 +57,7 @@ module Rouge
...
@@ -57,10 +57,7 @@ module Rouge
# Add leftover text
# Add leftover text
rendered
<<
current_line
if
current_line
.
present?
rendered
<<
current_line
if
current_line
.
present?
num_lines
=
rendered
.
size
{
code:
rendered
}
numbers
=
(
@linenostart
..
num_lines
+
@linenostart
-
1
).
to_a
{
numbers:
numbers
,
code:
rendered
}
end
end
def
wrap_lines
(
lines
)
def
wrap_lines
(
lines
)
...
@@ -68,20 +65,8 @@ module Rouge
...
@@ -68,20 +65,8 @@ module Rouge
lines
=
lines
.
each_with_index
.
map
do
|
line
,
index
|
lines
=
lines
.
each_with_index
.
map
do
|
line
,
index
|
number
=
index
+
@linenostart
number
=
index
+
@linenostart
if
@linenos
==
'inline'
"<span id=
\"
#{
@lineanchorsid
}#{
number
}
\"
class=
\"
line
\"
>
#{
line
}
"
\
"<a name=
\"
L
#{
number
}
\"
></a>"
\
'</span>'
"<span class=
\"
linenos
\"
>
#{
number
}
</span>"
\
"<span id=
\"
#{
@lineanchorsid
}#{
number
}
\"
class=
\"
line
\"
>
#{
line
}
"
\
'</span>'
else
"<span id=
\"
#{
@lineanchorsid
}#{
number
}
\"
class=
\"
line
\"
>
#{
line
}
"
\
'</span>'
end
end
elsif
@linenos
==
'inline'
lines
=
lines
.
each_with_index
.
map
do
|
line
,
index
|
number
=
index
+
@linenostart
"<span class=
\"
linenos
\"
>
#{
number
}
</span>
#{
line
}
"
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