diff options
author | Phil Hughes <me@iamphill.com> | 2018-12-12 09:31:22 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-12-12 09:31:22 +0000 |
commit | 2155395025422d106968964ea59b109caa142ba4 (patch) | |
tree | bc6bc5bd3a01ba654e465551ec7048691b23eb6a /app | |
parent | e7a6b841684f9a2929b16176b223ea44bfc26332 (diff) | |
parent | 1285fe687478bf315f7ece364cb0691ab599ab9d (diff) | |
download | gitlab-ce-2155395025422d106968964ea59b109caa142ba4.tar.gz |
Merge branch 'winh-markdown-preview-lists' into 'master'
Remove unnecessary div from MarkdownField to apply list styles correctly
Closes #55190
See merge request gitlab-org/gitlab-ce!23733
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/markdown/field.vue | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/app/assets/javascripts/vue_shared/components/markdown/field.vue b/app/assets/javascripts/vue_shared/components/markdown/field.vue index 21d6519191f..43def2673eb 100644 --- a/app/assets/javascripts/vue_shared/components/markdown/field.vue +++ b/app/assets/javascripts/vue_shared/components/markdown/field.vue @@ -1,6 +1,6 @@ <script> import $ from 'jquery'; -import { s__ } from '~/locale'; +import { __ } from '~/locale'; import Flash from '../../../flash'; import GLForm from '../../../gl_form'; import markdownHeader from './header.vue'; @@ -99,11 +99,12 @@ export default { if (text) { this.markdownPreviewLoading = true; + this.markdownPreview = __('Loading…'); this.$http .post(this.versionedPreviewPath(), { text }) .then(resp => resp.json()) .then(data => this.renderMarkdown(data)) - .catch(() => new Flash(s__('Error loading markdown preview'))); + .catch(() => new Flash(__('Error loading markdown preview'))); } else { this.renderMarkdown(); } @@ -162,10 +163,12 @@ export default { /> </div> </div> - <div v-show="previewMarkdown" class="md md-preview-holder md-preview js-vue-md-preview"> - <div ref="markdown-preview" v-html="markdownPreview"></div> - <span v-if="markdownPreviewLoading"> Loading... </span> - </div> + <div + v-show="previewMarkdown" + ref="markdown-preview" + class="md-preview js-vue-md-preview md md-preview-holder" + v-html="markdownPreview" + ></div> <template v-if="previewMarkdown && !markdownPreviewLoading"> <div v-if="referencedCommands" class="referenced-commands" v-html="referencedCommands"></div> <div v-if="shouldShowReferencedUsers" class="referenced-users"> |