@adobe/helix-md2docx 2.0.50 → 2.1.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,17 @@
1
+ # [2.1.0](https://github.com/adobe/helix-md2docx/compare/v2.0.51...v2.1.0) (2023-05-04)
2
+
3
+
4
+ ### Features
5
+
6
+ * re-add image title support ([#256](https://github.com/adobe/helix-md2docx/issues/256)) ([ace69c1](https://github.com/adobe/helix-md2docx/commit/ace69c1be4fa5777447d67f84cd9cb30fed99ebb))
7
+
8
+ ## [2.0.51](https://github.com/adobe/helix-md2docx/compare/v2.0.50...v2.0.51) (2023-04-22)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **deps:** update external fixes ([d90e551](https://github.com/adobe/helix-md2docx/commit/d90e55153338ead99c3f9a0a6ed9080c0644320f))
14
+
1
15
  ## [2.0.50](https://github.com/adobe/helix-md2docx/compare/v2.0.49...v2.0.50) (2023-04-15)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-md2docx",
3
- "version": "2.0.50",
3
+ "version": "2.1.0",
4
4
  "description": "Helix Service that converts markdown to word documents",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -32,7 +32,7 @@
32
32
  "@adobe/helix-markdown-support": "6.1.1",
33
33
  "@adobe/helix-shared-process-queue": "3.0.0",
34
34
  "@adobe/remark-gridtables": "1.0.2",
35
- "docx": "8.0.2",
35
+ "docx": "8.0.3",
36
36
  "hast-util-is-element": "2.1.3",
37
37
  "hast-util-to-mdast": "9.0.0",
38
38
  "image-size": "1.0.2",
@@ -45,13 +45,13 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@adobe/eslint-config-helix": "2.0.2",
48
- "@adobe/helix-mediahandler": "2.1.4",
48
+ "@adobe/helix-mediahandler": "2.1.6",
49
49
  "@semantic-release/changelog": "6.0.3",
50
50
  "@semantic-release/exec": "6.0.3",
51
51
  "@semantic-release/git": "10.0.1",
52
52
  "c8": "7.13.0",
53
53
  "dotenv": "16.0.3",
54
- "eslint": "8.38.0",
54
+ "eslint": "8.39.0",
55
55
  "eslint-import-resolver-exports": "1.0.0-beta.5",
56
56
  "eslint-plugin-header": "3.1.1",
57
57
  "eslint-plugin-import": "2.27.5",
@@ -60,19 +60,14 @@ export default async function image(ctx, node) {
60
60
  },
61
61
  };
62
62
 
63
- const drawing = new Drawing(imageData, { floating: false });
64
- // hack to get document properties to set alt text
65
- if (node.title || node.alt) {
66
- const docProps = findXMLComponent(drawing, 'wp:inline/wp:docPr/_attr');
67
- if (docProps && docProps.root) {
68
- if (node.title) {
69
- docProps.root.title = node.title;
70
- }
71
- if (node.alt) {
72
- docProps.root.descr = node.alt;
73
- }
74
- }
75
- }
63
+ const drawing = new Drawing(imageData, {
64
+ floating: false,
65
+ docProperties: {
66
+ title: node.title || '',
67
+ description: node.alt || '',
68
+ name: node.title || node.alt || '',
69
+ },
70
+ });
76
71
 
77
72
  // create picture
78
73
  const pic = new ImageRun({