Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-10 03:09:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-10 03:09:13 +0300
commitb2cb8c48c5dddbbce803db8b7e600f722658002c (patch)
treed05d629228370a15001300bf9d3fb7c9cb873dd6 /app/helpers/wiki_helper.rb
parent4f288fdc9299a1951232a05593fcfd942c11b61f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/wiki_helper.rb')
-rw-r--r--app/helpers/wiki_helper.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/wiki_helper.rb b/app/helpers/wiki_helper.rb
index c3ef4cbf841..c51dfefc0de 100644
--- a/app/helpers/wiki_helper.rb
+++ b/app/helpers/wiki_helper.rb
@@ -128,4 +128,13 @@ module WikiHelper
raise NotImplementedError, "Unknown wiki container type #{wiki.container.class.name}"
end
end
+
+ def wiki_page_tracking_context(page)
+ {
+ 'wiki-format' => page.format,
+ 'wiki-title-size' => page.title.bytesize,
+ 'wiki-content-size' => page.raw_content.bytesize,
+ 'wiki-directory-nest-level' => page.path.scan('/').count
+ }
+ end
end