Prechádzať zdrojové kódy

don't hide contents of "details" tag

Gildas 5 rokov pred
rodič
commit
65e9cc5446
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      lib/single-file/single-file-helper.js

+ 1 - 1
lib/single-file/single-file-helper.js

@@ -156,7 +156,7 @@ this.singlefile.lib.helper = this.singlefile.lib.helper || (() => {
 			if (!options.autoSaveExternalSave && (options.removeHiddenElements || options.removeUnusedFonts || options.compressHTML)) {
 				computedStyle = win.getComputedStyle(element);
 				if (options.removeHiddenElements) {
-					elementKept = (ascendantHidden || element.closest("html > head")) && KEPT_TAG_NAMES.includes(element.tagName);
+					elementKept = ((ascendantHidden || element.closest("html > head")) && KEPT_TAG_NAMES.includes(element.tagName)) || element.closest("details");
 					if (!elementKept) {
 						elementHidden = ascendantHidden || testHiddenElement(element, computedStyle);
 						if (elementHidden) {