lexxy 0.9.15.alpha.3 → 0.9.15.alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascript/lexxy.js +7 -3
- data/app/assets/javascript/lexxy.js.br +0 -0
- data/app/assets/javascript/lexxy.js.gz +0 -0
- data/app/assets/javascript/lexxy.js.map +1 -1
- data/app/assets/javascript/lexxy.min.js +1 -1
- data/app/assets/javascript/lexxy.min.js.br +0 -0
- data/app/assets/javascript/lexxy.min.js.gz +0 -0
- data/lib/lexxy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0ed84486acc1dd14ca8115810af473196b728becab0923ceb46abe248462b494
|
|
4
|
+
data.tar.gz: d0f78f873024dbb0851bbf5482926f8fc14e894f70963ba9855e351ac0757e17
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0314c9b63c0270154e62ac1976a4784153b710107209dc928251e5891ae46afc5ee3eb345d0e3dcf8e123497be49ceac0de666b9f9313849be89919eba4246ee
|
|
7
|
+
data.tar.gz: 763c0f8830fa0b6254a67b5af876db8814471e01edc6642c3dd9d52c0132abad6ce4e1bf4dda4a1ef83aad1d9f5791f7d76581ac063f6b4c6680154cdfecaa5a
|
|
@@ -16475,8 +16475,8 @@ function defineElements() {
|
|
|
16475
16475
|
});
|
|
16476
16476
|
}
|
|
16477
16477
|
|
|
16478
|
-
function highlightCode() {
|
|
16479
|
-
const elements =
|
|
16478
|
+
function highlightCode(root = document) {
|
|
16479
|
+
const elements = root.querySelectorAll("pre[data-language]:not([data-highlighted])");
|
|
16480
16480
|
|
|
16481
16481
|
elements.forEach(preElement => {
|
|
16482
16482
|
highlightElement(preElement);
|
|
@@ -16484,6 +16484,8 @@ function highlightCode() {
|
|
|
16484
16484
|
}
|
|
16485
16485
|
|
|
16486
16486
|
function highlightElement(preElement) {
|
|
16487
|
+
if (preElement.dataset.highlighted === "true") return
|
|
16488
|
+
|
|
16487
16489
|
const language = preElement.getAttribute("data-language");
|
|
16488
16490
|
let code = preElement.innerHTML.replace(/<br\s*\/?>/gi, "\n");
|
|
16489
16491
|
|
|
@@ -16502,6 +16504,8 @@ function highlightElement(preElement) {
|
|
|
16502
16504
|
if (highlights.length > 0) {
|
|
16503
16505
|
applyHighlightRanges(preElement, highlights);
|
|
16504
16506
|
}
|
|
16507
|
+
|
|
16508
|
+
preElement.dataset.highlighted = "true";
|
|
16505
16509
|
}
|
|
16506
16510
|
|
|
16507
16511
|
// Walk the DOM tree inside a <pre> element and build a list of
|
|
@@ -16710,5 +16714,5 @@ const configure = Lexxy.configure;
|
|
|
16710
16714
|
// Pushing elements definition to after the current call stack to allow global configuration to take place first
|
|
16711
16715
|
setTimeout(defineElements, 0);
|
|
16712
16716
|
|
|
16713
|
-
export { $createActionTextAttachmentNode, $createActionTextAttachmentUploadNode, $isActionTextAttachmentNode, ActionTextAttachmentNode, ActionTextAttachmentUploadNode, CustomActionTextAttachmentNode, LexxyExtension as Extension, HorizontalDividerNode, NativeAdapter, configure, highlightCode };
|
|
16717
|
+
export { $createActionTextAttachmentNode, $createActionTextAttachmentUploadNode, $isActionTextAttachmentNode, ActionTextAttachmentNode, ActionTextAttachmentUploadNode, CustomActionTextAttachmentNode, LexxyExtension as Extension, HorizontalDividerNode, NativeAdapter, configure, highlightCode, highlightElement };
|
|
16714
16718
|
//# sourceMappingURL=lexxy.js.map
|
|
Binary file
|
|
Binary file
|