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
Tatuya Kamada
gitlab-ce
Commits
a14d109b
Commit
a14d109b
authored
Apr 23, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide autoload paths for filters to prevent circular dependency
parent
b71e5a17
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
lib/gitlab/markdown.rb
lib/gitlab/markdown.rb
+14
-3
lib/gitlab/markdown/cross_project_reference.rb
lib/gitlab/markdown/cross_project_reference.rb
+1
-1
No files found.
lib/gitlab/markdown.rb
View file @
a14d109b
...
...
@@ -29,6 +29,17 @@ module Gitlab
# >> gfm(":trollface:")
# => "<img alt=\":trollface:\" class=\"emoji\" src=\"/images/trollface.png" title=\":trollface:\" />
module
Markdown
# Provide autoload paths for filters to prevent a circular dependency error
autoload
:CommitRangeReferenceFilter
,
'gitlab/markdown/commit_range_reference_filter'
autoload
:CommitReferenceFilter
,
'gitlab/markdown/commit_reference_filter'
autoload
:EmojiFilter
,
'gitlab/markdown/emoji_filter'
autoload
:ExternalIssueReferenceFilter
,
'gitlab/markdown/external_issue_reference_filter'
autoload
:IssueReferenceFilter
,
'gitlab/markdown/issue_reference_filter'
autoload
:LabelReferenceFilter
,
'gitlab/markdown/label_reference_filter'
autoload
:MergeRequestReferenceFilter
,
'gitlab/markdown/merge_request_reference_filter'
autoload
:SnippetReferenceFilter
,
'gitlab/markdown/snippet_reference_filter'
autoload
:UserReferenceFilter
,
'gitlab/markdown/user_reference_filter'
# Public: Parse the provided text with GitLab-Flavored Markdown
#
# text - the source text
...
...
@@ -64,11 +75,11 @@ module Gitlab
context
=
{
# SanitizationFilter
whitelist:
sanitization_whitelist
,
whitelist:
sanitization_whitelist
,
# EmojiFilter
asset_root:
Gitlab
.
config
.
gitlab
.
url
,
asset_host:
Gitlab
::
Application
.
config
.
asset_host
,
asset_root:
Gitlab
.
config
.
gitlab
.
url
,
asset_host:
Gitlab
::
Application
.
config
.
asset_host
,
# ReferenceFilter
current_user:
current_user
,
...
...
lib/gitlab/markdown/cross_project_reference.rb
View file @
a14d109b
...
...
@@ -20,7 +20,7 @@ module Gitlab
other
=
Project
.
find_with_namespace
(
ref
)
return
nil
unless
other
&&
user_can_reference_project?
(
other
)
other
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