Skip to content

Commit

Permalink
Merge pull request #81 from solvedac/fix/code-editor-style
Browse files Browse the repository at this point in the history
코드 편집기 하이라이팅을 고칩니다.
  • Loading branch information
RanolP authored Aug 25, 2024
2 parents f54be3e + 7e60526 commit ffe7b04
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,10 @@
};
const $elements = document.getElementById('elements');
const updateStyle = (isDark) => {
for (const pre of $elements.querySelectorAll('pre.sl-code-viewer')) {
for (const pre of [
...Array.from($elements.querySelectorAll('pre.sl-code-viewer')),
...Array.from($elements.querySelectorAll('div.sl-code-editor')),
]) {
const isPreDark = isDark || !!pre.closest('.sl-inverted');
const theme = isPreDark ? darkTheme : lightTheme;
for (const span of pre.querySelectorAll('span')) {
Expand Down

0 comments on commit ffe7b04

Please sign in to comment.