diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-12-11 16:57:28 +0300 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2018-12-12 10:48:18 +0300 |
commit | 1285fe687478bf315f7ece364cb0691ab599ab9d (patch) | |
tree | 8acc4309f731103774bab532ca954091ebdf3381 /app/assets/javascripts/vue_shared/components/markdown/field.vue | |
parent | b388111f6ed5181c357f5c37277f16c6ae234f5a (diff) |
Remove unnecessary div from MarkdownField to apply list styles correctly
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/markdown/field.vue')
-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"> |