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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
16 deletions
+1
-16
html_gitlab.rb
lib/rouge/formatters/html_gitlab.rb
+1
-16
No files found.
lib/rouge/formatters/html_gitlab.rb
View file @
55dc7d09
...
...
@@ -57,10 +57,7 @@ module Rouge
# Add leftover text
rendered
<<
current_line
if
current_line
.
present?
num_lines
=
rendered
.
size
numbers
=
(
@linenostart
..
num_lines
+
@linenostart
-
1
).
to_a
{
numbers:
numbers
,
code:
rendered
}
{
code:
rendered
}
end
def
wrap_lines
(
lines
)
...
...
@@ -68,22 +65,10 @@ module Rouge
lines
=
lines
.
each_with_index
.
map
do
|
line
,
index
|
number
=
index
+
@linenostart
if
@linenos
==
'inline'
"<a name=
\"
L
#{
number
}
\"
></a>"
\
"<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
lines
.
join
(
"
\n
"
)
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