Commit 5afe750b authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/349134/readmeCodeButton' into 'master'

Fix README files not showing the copy code button

See merge request gitlab-org/gitlab!77501
parents 23b4f600 8aff99bc
......@@ -47,6 +47,9 @@ export default {
}
},
},
safeHtmlConfig: {
ADD_TAGS: ['copy-code'],
},
};
</script>
......@@ -62,7 +65,11 @@ export default {
</div>
<div class="blob-viewer" data-qa-selector="blob_viewer_content" itemprop="about">
<gl-loading-icon v-if="loading > 0" size="md" color="dark" class="my-4 mx-auto" />
<div v-else-if="readme" ref="readme" v-safe-html="readme.html"></div>
<div
v-else-if="readme"
ref="readme"
v-safe-html:[$options.safeHtmlConfig]="readme.html"
></div>
</div>
</article>
</template>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment