Skip to content

Commit a35d45c

Browse files
committed
add multiple classes using DOMTokeList#add method in copy to clipboard script
1 parent 6e9b186 commit a35d45c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/js/06-copy-to-clipboard.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
var block = pre.parentNode.parentNode
1818
block.classList.remove('literalblock')
1919
block.classList.add('listingblock')
20-
pre.classList.add('highlightjs')
21-
pre.classList.add('highlight')
20+
pre.classList.add('highlightjs', 'highlight')
2221
;(code = document.createElement('code')).className = 'language-console hljs'
2322
code.dataset.lang = 'console'
2423
code.appendChild(pre.firstChild)

0 commit comments

Comments
 (0)