From ee6cda42d8631c5f1f6ef47ac1aec0b178a6cbf2 Mon Sep 17 00:00:00 2001 From: 0xRaiden <67233402+Raiden1411@users.noreply.github.com> Date: Thu, 16 Mar 2023 05:45:57 +0000 Subject: [PATCH] fix(theme): prevent code-groups conflict with shiki-twoslash (#2059) --- src/client/app/composables/codeGroups.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/app/composables/codeGroups.ts b/src/client/app/composables/codeGroups.ts index 2c5c2cb0..e4bd5c5c 100644 --- a/src/client/app/composables/codeGroups.ts +++ b/src/client/app/composables/codeGroups.ts @@ -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')