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
Jérome Perrin
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
18 deletions
+3
-18
lib/rouge/formatters/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
# 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,20 +65,8 @@ 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
}
"
"<span id=
\"
#{
@lineanchorsid
}#{
number
}
\"
class=
\"
line
\"
>
#{
line
}
"
\
'</span>'
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