@rspress/shared 0.0.0-nightly-20231113160317 → 0.0.0-nightly-20231115160134
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.
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1269,7 +1269,8 @@ function normalizeHref(url, cleanUrls = false) {
|
|
1269
1269
|
if (url.startsWith("mailto:") || url.startsWith("tel:")) {
|
1270
1270
|
return url;
|
1271
1271
|
}
|
1272
|
-
|
1272
|
+
const hasExt = cleanUrl2.split("/").pop()?.includes(".");
|
1273
|
+
if (!cleanUrls && !cleanUrl2.endsWith(".html") && !hasExt) {
|
1273
1274
|
if (cleanUrl2.endsWith("/")) {
|
1274
1275
|
cleanUrl2 += "index.html";
|
1275
1276
|
} else {
|
package/dist/index.mjs
CHANGED
@@ -1212,7 +1212,8 @@ function normalizeHref(url, cleanUrls = false) {
|
|
1212
1212
|
if (url.startsWith("mailto:") || url.startsWith("tel:")) {
|
1213
1213
|
return url;
|
1214
1214
|
}
|
1215
|
-
|
1215
|
+
const hasExt = cleanUrl2.split("/").pop()?.includes(".");
|
1216
|
+
if (!cleanUrls && !cleanUrl2.endsWith(".html") && !hasExt) {
|
1216
1217
|
if (cleanUrl2.endsWith("/")) {
|
1217
1218
|
cleanUrl2 += "index.html";
|
1218
1219
|
} else {
|