소스 검색

don't group SVG files

Gildas 7 년 전
부모
커밋
8cfcf63644
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lib/single-file/single-file-core.js

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

@@ -1109,7 +1109,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 									resourceElement.remove();
 								} else {
 									if (content.startsWith(prefixDataURI) || content.startsWith(PREFIX_DATA_URI_NO_MIMETYPE) || content.startsWith(PREFIX_DATA_URI_OCTET_STREAM)) {
-										if (processDuplicates && duplicate && options.groupDuplicateImages && DomUtil.replaceImageSource(resourceElement, SINGLE_FILE_VARIABLE_NAME_PREFIX + indexResource, options)) {
+										if (processDuplicates && duplicate && options.groupDuplicateImages && !content.startsWith(PREFIX_DATA_URI_IMAGE_SVG) && DomUtil.replaceImageSource(resourceElement, SINGLE_FILE_VARIABLE_NAME_PREFIX + indexResource, options)) {
 											DomUtil.insertVariable(doc, indexResource, content, options);
 										} else {
 											resourceElement.setAttribute(attributeName, content);