diff options
author | Phil Hughes <me@iamphill.com> | 2016-10-13 10:34:35 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-10-14 12:52:48 +0300 |
commit | 270434f7372dcb4d412f3f62068f69d8eac212e8 (patch) | |
tree | d9454f6975fe3fc57941521d5c00b4a33b121994 /app | |
parent | 456149345ba441b00d4de96b8eb211b9e1aab7e9 (diff) |
Loads GFM once for per page
#22827
Diffstat (limited to 'app')
-rw-r--r-- | app/views/layouts/application.html.haml | 1 | ||||
-rw-r--r-- | app/views/projects/_zen.html.haml | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 15a94ac23c5..6c2285fa2b6 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -11,3 +11,4 @@ = render 'layouts/page', sidebar: sidebar, nav: nav = yield :scripts_body + = render "layouts/init_auto_complete" if @gfm_form diff --git a/app/views/projects/_zen.html.haml b/app/views/projects/_zen.html.haml index cb97181b9e1..0c8241053e7 100644 --- a/app/views/projects/_zen.html.haml +++ b/app/views/projects/_zen.html.haml @@ -1,3 +1,4 @@ +- @gfm_form = true - supports_slash_commands = local_assigns.fetch(:supports_slash_commands, false) .zen-backdrop - classes << ' js-gfm-input js-autosize markdown-area' @@ -7,6 +8,3 @@ = text_area_tag attr, nil, class: classes, placeholder: placeholder %a.zen-control.zen-control-leave.js-zen-leave{ href: "#" } = icon('compress') - -- content_for :scripts_body do - = render "layouts/init_auto_complete" if current_user && (@target_project || @project) |