@adobe/helix-docx2md 1.6.2 → 1.6.4

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,17 @@
1
+ ## [1.6.4](https://github.com/adobe/helix-docx2md/compare/v1.6.3...v1.6.4) (2024-07-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency dirname-filename-esm to v1.1.2 ([7e9b563](https://github.com/adobe/helix-docx2md/commit/7e9b563756d432939f2b41e35ed607324fde8828))
7
+
8
+ ## [1.6.3](https://github.com/adobe/helix-docx2md/compare/v1.6.2...v1.6.3) (2024-07-04)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * render broken bookmark links (anchors) ([#487](https://github.com/adobe/helix-docx2md/issues/487)) ([597e5cd](https://github.com/adobe/helix-docx2md/commit/597e5cdf9dc769d0b46f4b99318484af18eb8a31))
14
+
1
15
  ## [1.6.2](https://github.com/adobe/helix-docx2md/compare/v1.6.1...v1.6.2) (2024-06-28)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-docx2md",
3
- "version": "1.6.2",
3
+ "version": "1.6.4",
4
4
  "description": "Helix library that converts word documents to markdown",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -34,12 +34,12 @@
34
34
  },
35
35
  "homepage": "https://github.com/adobe/helix-docx2md#readme",
36
36
  "dependencies": {
37
- "@adobe/helix-markdown-support": "7.1.3",
37
+ "@adobe/helix-markdown-support": "7.1.4",
38
38
  "@adobe/helix-shared-process-queue": "3.0.4",
39
39
  "@adobe/mammoth": "1.7.1-bleeding.2",
40
40
  "@adobe/mdast-util-gridtables": "4.0.6",
41
41
  "@adobe/remark-gridtables": "3.0.6",
42
- "dirname-filename-esm": "1.1.1",
42
+ "dirname-filename-esm": "1.1.2",
43
43
  "github-slugger": "2.0.0",
44
44
  "mdast-util-to-markdown": "2.1.0",
45
45
  "mdast-util-to-string": "4.0.0",
@@ -53,10 +53,10 @@
53
53
  },
54
54
  "devDependencies": {
55
55
  "@adobe/eslint-config-helix": "2.0.6",
56
- "@adobe/helix-admin-support": "2.8.17",
57
- "@adobe/helix-mediahandler": "2.5.11",
58
- "@adobe/helix-onedrive-support": "11.3.37",
59
- "@adobe/helix-shared-tokencache": "1.4.15",
56
+ "@adobe/helix-admin-support": "2.8.22",
57
+ "@adobe/helix-mediahandler": "2.5.13",
58
+ "@adobe/helix-onedrive-support": "11.5.5",
59
+ "@adobe/helix-shared-tokencache": "1.4.22",
60
60
  "@semantic-release/changelog": "6.0.3",
61
61
  "@semantic-release/exec": "6.0.3",
62
62
  "@semantic-release/git": "10.0.1",
@@ -66,7 +66,7 @@
66
66
  "husky": "9.0.11",
67
67
  "junit-report-builder": "3.2.1",
68
68
  "lint-staged": "15.2.7",
69
- "mocha": "10.4.0",
69
+ "mocha": "10.6.0",
70
70
  "mocha-multi-reporters": "1.5.1",
71
71
  "semantic-release": "24.0.0",
72
72
  "unist-util-inspect": "8.0.0"
@@ -104,11 +104,13 @@ export default async function dast2mdast(tree, opts = {}) {
104
104
  const slugger = new IDSlugger();
105
105
  for (const bm of bookmarks) {
106
106
  if (!bm.target) {
107
- if (bm.name !== '_top') {
108
- // eslint-disable-next-line no-continue
109
- continue;
107
+ if (bm.name === '_top') {
108
+ bm.id = '';
109
+ } else {
110
+ // link to "broken" bookmark. this happens if the author enters a `#anchor` link.
111
+ // we just use the name (i.e. the anchor) as the id.
112
+ bm.id = bm.name;
110
113
  }
111
- bm.id = '';
112
114
  } else if (bm.target.type === 'heading') {
113
115
  // if heading, create an ID from its text
114
116
  if (!bm.target.id) {