Просмотр исходного кода

avoid the presence of .html twice in the file name

Gildas 7 лет назад
Родитель
Сommit
d0a30f7957
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      lib/single-file/single-file-core.js

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

@@ -257,7 +257,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 				title = titleElement.textContent.trim();
 			}
 			return {
-				title: title || (this.baseURI ? this.baseURI.match(/([^/]*)\/?$/)[1] : ""),
+				title: title || (this.baseURI ? this.baseURI.match(/([^/]*)\/?(\.html?.*)$/)[1] : ""),
 				content: this.dom.serialize()
 			};
 		}