Commit 7a3a4c0b authored by Phil Hughes's avatar Phil Hughes

Merge branch 'djadmin-remove-mermaid-copy-code-btn' into 'master'

Disable copy-code button for mermaid diagrams

See merge request gitlab-org/gitlab!77935
parents b803af88 ca5833e1
......@@ -30,6 +30,7 @@ class CopyCodeButton extends HTMLElement {
function addCodeButton() {
[...document.querySelectorAll('pre.code.js-syntax-highlight')]
.filter((el) => el.attr('lang') !== 'mermaid')
.filter((el) => !el.closest('.js-markdown-code'))
.forEach((el) => {
const copyCodeEl = document.createElement('copy-code');
......
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