@adobe/helix-html-pipeline 6.14.13 → 6.15.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [6.15.0](https://github.com/adobe/helix-html-pipeline/compare/v6.14.13...v6.15.0) (2024-10-08)
2
+
3
+
4
+ ### Features
5
+
6
+ * rewrite same-page links on .plain.html ([#656](https://github.com/adobe/helix-html-pipeline/issues/656)) ([9c37499](https://github.com/adobe/helix-html-pipeline/commit/9c37499098f95d4dcfc6fa650d249112bbf9cf08)), closes [#642](https://github.com/adobe/helix-html-pipeline/issues/642)
7
+
1
8
  ## [6.14.13](https://github.com/adobe/helix-html-pipeline/compare/v6.14.12...v6.14.13) (2024-10-04)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-html-pipeline",
3
- "version": "6.14.13",
3
+ "version": "6.15.0",
4
4
  "description": "Helix HTML Pipeline",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -70,7 +70,7 @@
70
70
  "unist-util-visit-parents": "6.0.1"
71
71
  },
72
72
  "devDependencies": {
73
- "@adobe/eslint-config-helix": "2.0.7",
73
+ "@adobe/eslint-config-helix": "2.0.8",
74
74
  "@markedjs/html-differ": "5.0.1",
75
75
  "@semantic-release/changelog": "6.0.3",
76
76
  "@semantic-release/git": "10.0.1",
@@ -79,7 +79,7 @@
79
79
  "eslint": "8.57.1",
80
80
  "eslint-import-resolver-exports": "1.0.0-beta.5",
81
81
  "eslint-plugin-header": "3.1.1",
82
- "eslint-plugin-import": "2.30.0",
82
+ "eslint-plugin-import": "2.31.0",
83
83
  "esmock": "2.6.7",
84
84
  "husky": "9.1.6",
85
85
  "js-yaml": "4.1.0",
@@ -211,8 +211,11 @@ export function rewriteUrl(state, url) {
211
211
  if ((host.includes('--') && HELIX_URL_REGEXP.test(url))
212
212
  || host === state.previewHost
213
213
  || host === state.liveHost) {
214
- if (hash && pathname === state.info?.path) {
215
- return hash;
214
+ if (hash && state.info?.path) {
215
+ if (pathname === state.info.path
216
+ || (pathname.endsWith('.plain.html') && pathname.substring(0, pathname.length - 11) === state.info.path)) {
217
+ return hash;
218
+ }
216
219
  }
217
220
  return `${pathname}${search}${hash}`;
218
221
  }