Commit 8aff99bc authored by Phil Hughes's avatar Phil Hughes

Fix README files not showing the copy code button

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/349134
parent 3d706635
......@@ -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