Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeSCahill committed Sep 3, 2024
2 parents 7974929 + 436c558 commit e4eb8c0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/css/component-home-v2.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
.component-home-v2 .grid-tertiary {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 10px;
gap: 20px;
padding-left: 20px;
}

Expand Down
1 change: 1 addition & 0 deletions src/css/doc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1498,6 +1498,7 @@ html[data-theme=dark] code[class*=language-] .token.function {
border-radius: 100%;
display: inline-block;
font-family: var(--body-font-family);
font-weight: 500;
font-size: calc(13.5 / var(--rem-base) * 1rem);
font-style: normal;
line-height: 1.1;
Expand Down
2 changes: 1 addition & 1 deletion src/css/editable-placeholders.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ span.editable {
z-index: 1;
}

span.editable > * {
span.editable span.token {
position: relative;
z-index: 1;
color: var(--editable-code-font-color) !important;
Expand Down
9 changes: 8 additions & 1 deletion src/js/11-editable-placeholders.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
/* eslint-disable */

const REGEX_EDITABLE_SPAN = /<.[^&A-Z]+>/g;
const REGEX_ESCAPE = /[\\^$*+?.()|[\]{}]/g;
const REGEX_HTML_TAG = /<[^>]*>/g;
const REGEX_LT_GT = /&lt;|&gt;/g;
const REGEX_PREPROCESS_PUNCTUATION = /<span class="token punctuation">(\()<\/span>|<span class="token punctuation">(\))<\/span>/g;
const REGEX_CONUM_SPAN = /(\s\(<span class="token number">(\d+)<\/span>\)|(\s)\((\d+)\))$/gm;

function addPencilSpans() {
const editableSpans = document.querySelectorAll('[contenteditable="true"].editable');

Expand Down Expand Up @@ -312,4 +319,4 @@ function processEditableSpans() {
}
return false;
}
})();
})();
6 changes: 1 addition & 5 deletions src/js/13-open-nested-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,8 @@
Prism.plugins.lineNumbers.resize(element);
});
Prism.highlightAll()
addPencilSpans()
});
const editableSpans = document.querySelectorAll('[contenteditable="true"].editable');
editableSpans.forEach(span => {
removeNestedSpans(span);
});
addPencilSpans();
}, 0);
}, true)
})
Expand Down

0 comments on commit e4eb8c0

Please sign in to comment.