diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-10-06 19:05:27 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-10-19 13:46:04 -0200 |
commit | 8e4301d982ce28d80e711865ac294a98ddce3ec6 (patch) | |
tree | 1f6d01b142ca952f3cd3098336fbb0762fe0a8dc /app/models/project_services/issue_tracker_service.rb | |
parent | f560849941dcb4408350c6c24034f845d3986782 (diff) | |
download | gitlab-ce-8e4301d982ce28d80e711865ac294a98ddce3ec6.tar.gz |
Prevent wrong markdown on issue ids when project has Jira service activatedissue_828
Diffstat (limited to 'app/models/project_services/issue_tracker_service.rb')
-rw-r--r-- | app/models/project_services/issue_tracker_service.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/project_services/issue_tracker_service.rb b/app/models/project_services/issue_tracker_service.rb index d1df6d0292f..b26ddd518d7 100644 --- a/app/models/project_services/issue_tracker_service.rb +++ b/app/models/project_services/issue_tracker_service.rb @@ -3,6 +3,12 @@ class IssueTrackerService < Service default_value_for :category, 'issue_tracker' + # Pattern used to extract links from comments + # Override this method on services that uses different patterns + def reference_pattern + @reference_pattern ||= %r{(\b[A-Z][A-Z0-9_]+-|#{Issue.reference_prefix})(?<issue>\d+)} + end + def default? default end |