fix(theme): prevent code-groups conflict with shiki-twoslash (#2059)

pull/2104/head
0xRaiden 2 years ago committed by GitHub
parent 1f2f1ff43d
commit ee6cda42d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,7 +11,9 @@ export function useCodeGroups() {
const i = Array.from(group?.querySelectorAll('input') || []).indexOf(el)
const current = group?.querySelector('div[class*="language-"].active')
const next = group?.querySelectorAll('div[class*="language-"]')?.[i]
const next = group?.querySelectorAll(
'div[class*="language-"]:not(.language-id)'
)?.[i]
if (current && next && current !== next) {
current.classList.remove('active')

Loading…
Cancel
Save