diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-10-04 09:44:14 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-10-04 09:44:14 +0900 |
commit | 5381985bd012562696637122b1dcd067480a94d3 (patch) | |
tree | 7e05baefc2df32f6ef324cae755de6294c89c92f /app/models | |
parent | 9c13a512f4a836d2d0d61dc4fbbc6fd8f76aa474 (diff) | |
parent | dfb9ac3a5f97a4c556bacea78174836fe7d39145 (diff) | |
download | gitlab-ce-5381985bd012562696637122b1dcd067480a94d3.tar.gz |
Merge branch 'master-ce' into scheduled-manual-jobs
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/merge_request.rb | 2 | ||||
-rw-r--r-- | app/models/wiki_page.rb | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 0481a4a3d28..6559f94a696 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -261,7 +261,7 @@ class MergeRequest < ActiveRecord::Base end end - WIP_REGEX = /\A\s*(\[WIP\]\s*|WIP:\s*|WIP\s+)+\s*/i.freeze + WIP_REGEX = /\A*(\[WIP\]\s*|WIP:\s*|WIP\s+)+\s*/i.freeze def self.work_in_progress?(title) !!(title =~ WIP_REGEX) diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index 102907a8bd3..42fd213d03b 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -58,7 +58,7 @@ class WikiPage attr_reader :page # The attributes Hash used for storing and validating - # new Page values before writing to the Gollum repository. + # new Page values before writing to the raw repository. attr_accessor :attributes def hook_attrs @@ -111,10 +111,7 @@ class WikiPage # The processed/formatted content of this page. def formatted_content - # Assuming @page exists, nil formatted_data means we didn't load it - # before hand (i.e. page was fetched by Gitaly), so we fetch it separately. - # If the page was fetched by Gollum, formatted_data would've been a String. - @attributes[:formatted_content] ||= @page&.formatted_data || @wiki.page_formatted_data(@page) + @attributes[:formatted_content] ||= @wiki.page_formatted_data(@page) end # The markup format for the page. |