summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-24 15:01:09 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-24 15:01:09 +0000
commit00df932c458bdd6bb2107760875124054f15543f (patch)
tree69ba5a137f282db7d6e6a7d83032bba089d872cf /app
parent3455664e4c7afc1387ef58849dcfc837b418837c (diff)
downloadgitlab-ce-00df932c458bdd6bb2107760875124054f15543f.tar.gz
Add latest changes from gitlab-org/gitlab@12-8-stable-ee
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/repository/components/preview/index.vue15
-rw-r--r--app/services/incident_management/create_issue_service.rb2
2 files changed, 15 insertions, 2 deletions
diff --git a/app/assets/javascripts/repository/components/preview/index.vue b/app/assets/javascripts/repository/components/preview/index.vue
index 2bc93c3f1c1..99f100eaa60 100644
--- a/app/assets/javascripts/repository/components/preview/index.vue
+++ b/app/assets/javascripts/repository/components/preview/index.vue
@@ -1,5 +1,8 @@
<script>
+import $ from 'jquery';
+import '~/behaviors/markdown/render_gfm';
import { GlLink, GlLoadingIcon } from '@gitlab/ui';
+import { handleLocationHash } from '~/lib/utils/common_utils';
import getReadmeQuery from '../../queries/getReadme.query.graphql';
export default {
@@ -30,6 +33,16 @@ export default {
loading: 0,
};
},
+ watch: {
+ readme(newVal) {
+ if (newVal) {
+ this.$nextTick(() => {
+ handleLocationHash();
+ $(this.$refs.readme).renderGFM();
+ });
+ }
+ },
+ },
};
</script>
@@ -45,7 +58,7 @@ export default {
</div>
<div class="blob-viewer">
<gl-loading-icon v-if="loading > 0" size="md" color="dark" class="my-4 mx-auto" />
- <div v-else-if="readme" v-html="readme.html"></div>
+ <div v-else-if="readme" ref="readme" v-html="readme.html"></div>
</div>
</article>
</template>
diff --git a/app/services/incident_management/create_issue_service.rb b/app/services/incident_management/create_issue_service.rb
index 94b6f037924..43077e03e6d 100644
--- a/app/services/incident_management/create_issue_service.rb
+++ b/app/services/incident_management/create_issue_service.rb
@@ -58,7 +58,7 @@ module IncidentManagement
end
def issue_description
- horizontal_line = "\n---\n\n"
+ horizontal_line = "\n\n---\n\n"
[
alert_summary,