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
cec866a7
Commit
cec866a7
authored
Dec 22, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve wiki rendering. Fix pygemnt + markdown invalid html
parent
ed35ea70
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
app/assets/stylesheets/gitlab_bootstrap/files.scss
app/assets/stylesheets/gitlab_bootstrap/files.scss
+9
-5
lib/redcarpet/render/gitlab_html.rb
lib/redcarpet/render/gitlab_html.rb
+6
-7
No files found.
app/assets/stylesheets/gitlab_bootstrap/files.scss
View file @
cec866a7
...
...
@@ -43,11 +43,15 @@
padding
:
0
4px
;
}
padding
:
20px
;
h1
,
h2
{
line-height
:
46px
;
}
h3
,
h4
{
line-height
:
40px
;
h1
{
font-size
:
26px
;
line-height
:
46px
;
}
h2
{
font-size
:
22px
;
line-height
:
42px
;
}
h3
{
font-size
:
20px
;
line-height
:
40px
;
}
h4
{
font-size
:
18px
;
line-height
:
32px
;
}
h5
{
font-size
:
16px
;
line-height
:
26px
;
}
.white
.highlight
pre
{
background
:
#f5f5f5
;
}
}
...
...
lib/redcarpet/render/gitlab_html.rb
View file @
cec866a7
...
...
@@ -11,14 +11,13 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
def
block_code
(
code
,
language
)
options
=
{
options:
{
encoding:
'utf-8'
}
}
options
.
merge!
(
lexer:
language
.
downcase
)
if
Pygments
::
Lexer
.
find
(
language
)
h
.
content_tag
:div
,
class:
h
.
user_color_scheme_class
do
if
Pygments
::
Lexer
.
find
(
language
)
Pygments
.
highlight
(
code
,
options
.
merge
(
lexer:
language
.
downcase
))
else
Pygments
.
highlight
(
code
,
options
)
end
.
html_safe
end
<<-
HTML
<div class="
#{
h
.
user_color_scheme_class
}
">
#{
Pygments
.
highlight
(
code
,
options
)
}
</div>
HTML
end
def
postprocess
(
full_document
)
...
...
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