@adobe/helix-md2docx 2.1.27 → 2.1.29

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.29](https://github.com/adobe/helix-md2docx/compare/v2.1.28...v2.1.29) (2023-09-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency @adobe/helix-docx2md to v1.4.18 ([#333](https://github.com/adobe/helix-md2docx/issues/333)) ([5c67511](https://github.com/adobe/helix-md2docx/commit/5c675118eb922c7e7fab0287191280368c184558))
7
+
8
+ ## [2.1.28](https://github.com/adobe/helix-md2docx/compare/v2.1.27...v2.1.28) (2023-09-29)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * cell alignment lost for heading and code ([#332](https://github.com/adobe/helix-md2docx/issues/332)) ([4a24e76](https://github.com/adobe/helix-md2docx/commit/4a24e767ee3eee1b4d36c60e29cf103bcc8bb829)), closes [#302](https://github.com/adobe/helix-md2docx/issues/302)
14
+
1
15
  ## [2.1.27](https://github.com/adobe/helix-md2docx/compare/v2.1.26...v2.1.27) (2023-09-26)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-md2docx",
3
- "version": "2.1.27",
3
+ "version": "2.1.29",
4
4
  "description": "Helix Service that converts markdown to word documents",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -28,7 +28,7 @@
28
28
  "homepage": "https://github.com/adobe/helix-md2docx#readme",
29
29
  "dependencies": {
30
30
  "@adobe/fetch": "4.1.0",
31
- "@adobe/helix-docx2md": "1.4.17",
31
+ "@adobe/helix-docx2md": "1.4.18",
32
32
  "@adobe/helix-markdown-support": "7.0.0",
33
33
  "@adobe/helix-shared-process-queue": "3.0.0",
34
34
  "@adobe/remark-gridtables": "2.0.1",
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import { Paragraph, TextRun } from 'docx';
13
13
 
14
- export default function code(ctx, node) {
14
+ export default function code(ctx, node, parent) {
15
15
  const children = node.value.split('\n').map((text, idx) => (
16
16
  new TextRun({
17
17
  text,
@@ -21,5 +21,6 @@ export default function code(ctx, node) {
21
21
  return new Paragraph({
22
22
  children,
23
23
  style: 'CodeBlock',
24
+ alignment: parent.alignment,
24
25
  });
25
26
  }
@@ -21,10 +21,11 @@ const DEPTHS = [
21
21
  HeadingLevel.HEADING_6,
22
22
  ];
23
23
 
24
- export default async function heading(ctx, node) {
24
+ export default async function heading(ctx, node, parent) {
25
25
  const children = await all(ctx, node);
26
26
  return new Paragraph({
27
27
  heading: DEPTHS[node.depth - 1],
28
28
  children,
29
+ alignment: parent.alignment,
29
30
  });
30
31
  }