Browse Source

fixed regular expression

Gildas 7 năm trước cách đây
mục cha
commit
dcc44e0015
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      lib/single-file/single-file-core.js

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

@@ -1175,7 +1175,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 	const DATA_URI_PREFIX = "data:";
 	const BLOB_URI_PREFIX = "blob:";
 	const HTTP_URI_PREFIX = /^https?:\/\//;
-	const EMPTY_URL = /^https?:\/\/+.*$/;
+	const EMPTY_URL = /^https?:\/\/+\s*$/;
 	const ABOUT_BLANK_URI = "about:blank";
 	const NOT_EMPTY_URL = /^https?:\/\/.+/;
 	const REGEXP_URL_FN = /(url\s*\(\s*'(.*?)'\s*\))|(url\s*\(\s*"(.*?)"\s*\))|(url\s*\(\s*(.*?)\s*\))/gi;