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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
256d2ae7
Commit
256d2ae7
authored
Apr 10, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rs-issue-2211' into 'master'
Update redcarpet to 3.2.3 Closes #2211 See merge request !1756
parents
6848312f
5a0ff2f5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
21 deletions
+25
-21
Gemfile
Gemfile
+1
-1
Gemfile.lock
Gemfile.lock
+2
-2
app/helpers/gitlab_markdown_helper.rb
app/helpers/gitlab_markdown_helper.rb
+21
-17
lib/gitlab/reference_extractor.rb
lib/gitlab/reference_extractor.rb
+1
-1
No files found.
Gemfile
View file @
256d2ae7
...
...
@@ -94,7 +94,7 @@ gem 'html-pipeline-gitlab', '~> 0.1'
gem
"
github-markup
"
# Required markup gems by github-markdown
gem
'
redcarpet
'
,
'~> 3.
1.2
'
gem
'
redcarpet
'
,
'~> 3.
2.3
'
gem
'
RedCloth
'
gem
'
rdoc
'
,
'~>3.6'
gem
'
org-ruby
'
,
'= 0.9.12'
...
...
Gemfile.lock
View file @
256d2ae7
...
...
@@ -457,7 +457,7 @@ GEM
ffi (>= 0.5.0)
rdoc (3.12.2)
json (~> 1.4)
redcarpet (3.
1.2
)
redcarpet (3.
2.3
)
redis (3.1.0)
redis-actionpack (4.0.0)
actionpack (~> 4)
...
...
@@ -755,7 +755,7 @@ DEPENDENCIES
rb-fsevent
rb-inotify
rdoc (~> 3.6)
redcarpet (~> 3.
1.2
)
redcarpet (~> 3.
2.3
)
redis-rails
request_store
rspec-rails (= 2.99)
...
...
app/helpers/gitlab_markdown_helper.rb
View file @
256d2ae7
...
...
@@ -31,15 +31,17 @@ module GitlabMarkdownHelper
def
markdown
(
text
,
options
=
{})
unless
@markdown
&&
options
==
@options
@options
=
options
gitlab_renderer
=
Redcarpet
::
Render
::
GitlabHTML
.
new
(
self
,
user_color_scheme_class
,
{
# see https://github.com/vmg/redcarpet#darling-i-packed-you-a-couple-renderers-for-lunch-
# see https://github.com/vmg/redcarpet#darling-i-packed-you-a-couple-renderers-for-lunch
rend
=
Redcarpet
::
Render
::
GitlabHTML
.
new
(
self
,
user_color_scheme_class
,
{
with_toc_data:
true
,
safe_links_only:
true
safe_links_only:
true
,
# Handled further down the line by HTML::Pipeline::SanitizationFilter
escape_html:
false
}.
merge
(
options
))
@markdown
=
Redcarpet
::
Markdown
.
new
(
gitlab_renderer
,
# see https://github.com/vmg/redcarpet#and-its-like-really-simple-to-use
@markdown
=
Redcarpet
::
Markdown
.
new
(
rend
,
no_intra_emphasis:
true
,
tables:
true
,
fenced_code_blocks:
true
,
...
...
@@ -47,8 +49,10 @@ module GitlabMarkdownHelper
strikethrough:
true
,
lax_spacing:
true
,
space_after_headers:
true
,
superscript:
true
)
superscript:
true
)
end
@markdown
.
render
(
text
).
html_safe
end
...
...
lib/gitlab/reference_extractor.rb
View file @
256d2ae7
...
...
@@ -3,7 +3,7 @@ module Gitlab
class
ReferenceExtractor
attr_accessor
:users
,
:labels
,
:issues
,
:merge_requests
,
:snippets
,
:commits
,
:commit_ranges
include
Markdown
include
::
Gitlab
::
Markdown
def
initialize
@users
,
@labels
,
@issues
,
@merge_requests
,
@snippets
,
@commits
,
@commit_ranges
=
...
...
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