Commit b48e79a9 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'djadmin-fix-copy-code-btn' into 'master'

Fix syntax error introduced in copy_code.js

See merge request gitlab-org/gitlab!78031
parents 1cc2383b 2afbe8bf
......@@ -30,7 +30,7 @@ class CopyCodeButton extends HTMLElement {
function addCodeButton() {
[...document.querySelectorAll('pre.code.js-syntax-highlight:not(.content-editor-code-block)')]
.filter((el) => el.attr('lang') !== 'mermaid')
.filter((el) => el.getAttribute('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