@vuepress/shared 2.0.0-rc.6 → 2.0.0-rc.7

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.d.ts CHANGED
@@ -159,7 +159,7 @@ interface SiteLocaleData {
159
159
  /**
160
160
  * Head config
161
161
  *
162
- * Descibe the tags to be appended into the `<head>` tag
162
+ * Describe the tags to be appended into the `<head>` tag
163
163
  *
164
164
  * @default []
165
165
  *
package/dist/index.js CHANGED
@@ -79,10 +79,9 @@ var isPlainObject = (val) => Object.prototype.toString.call(val) === "[object Ob
79
79
 
80
80
  // src/utils/normalizeRoutePath.ts
81
81
  var normalizeRoutePath = (path) => {
82
- const [pathname, ...rest] = path.split(/(\?|#)/);
82
+ const [pathname, ...queryAndHash] = path.split(/(\?|#)/);
83
83
  if (!pathname || pathname.endsWith("/"))
84
84
  return path;
85
- const queryAndHash = rest.length > 0 ? rest.join("") : "";
86
85
  let routePath = pathname.replace(/(^|\/)README.md$/i, "$1index.html");
87
86
  if (routePath.endsWith(".md")) {
88
87
  routePath = routePath.substring(0, routePath.length - 3) + ".html";
@@ -90,9 +89,9 @@ var normalizeRoutePath = (path) => {
90
89
  routePath = routePath + ".html";
91
90
  }
92
91
  if (routePath.endsWith("/index.html")) {
93
- return routePath.substring(0, routePath.length - 10) + queryAndHash;
92
+ routePath = routePath.substring(0, routePath.length - 10);
94
93
  }
95
- return routePath + queryAndHash;
94
+ return routePath + queryAndHash.join("");
96
95
  };
97
96
 
98
97
  // src/utils/omit.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/shared",
3
- "version": "2.0.0-rc.6",
3
+ "version": "2.0.0-rc.7",
4
4
  "description": "Utils that shared between VuePress node and client",
5
5
  "keywords": [
6
6
  "vuepress",