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
aa4007a5
Commit
aa4007a5
authored
Oct 22, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slight refactoring
parent
51ed8fd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
lib/gitlab/reference_extractor.rb
lib/gitlab/reference_extractor.rb
+2
-10
No files found.
lib/gitlab/reference_extractor.rb
View file @
aa4007a5
...
...
@@ -11,6 +11,7 @@ module Gitlab
@load_lazy_references
=
load_lazy_references
@texts
=
[]
@references
=
{}
end
def
analyze
(
text
,
options
=
{})
...
...
@@ -19,21 +20,12 @@ module Gitlab
%i(user label issue merge_request snippet commit commit_range)
.
each
do
|
type
|
define_method
(
"
#{
type
}
s"
)
do
references
[
type
]
@references
[
type
]
||=
pipeline_result
(
type
)
end
end
private
def
references
@references
||=
Hash
.
new
do
|
references
,
type
|
type
=
type
.
to_sym
next
references
[
type
]
if
references
.
has_key?
(
type
)
references
[
type
]
=
pipeline_result
(
type
)
end
end
# Instantiate and call HTML::Pipeline with a single reference filter type,
# returning the result
#
...
...
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