@adobe/helix-md2docx 2.1.80 → 2.1.81

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
+ ## [2.1.81](https://github.com/adobe/helix-md2docx/compare/v2.1.80...v2.1.81) (2024-11-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * breaks in headings ([#503](https://github.com/adobe/helix-md2docx/issues/503)) ([c1e3edd](https://github.com/adobe/helix-md2docx/commit/c1e3edd5f22c2cbf41f7318aec4abdb314cff634)), closes [#498](https://github.com/adobe/helix-md2docx/issues/498)
7
+
1
8
  ## [2.1.80](https://github.com/adobe/helix-md2docx/compare/v2.1.79...v2.1.80) (2024-11-03)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-md2docx",
3
- "version": "2.1.80",
3
+ "version": "2.1.81",
4
4
  "description": "Helix Service that converts markdown to word documents",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -120,6 +120,13 @@ export default function sanitizeHtml(tree) {
120
120
 
121
121
  // collapse html blocks
122
122
  if (node.type === 'html') {
123
+ if (node.value === '<br>') {
124
+ // eslint-disable-next-line no-param-reassign
125
+ node.type = 'break';
126
+ // eslint-disable-next-line no-param-reassign
127
+ delete node.value;
128
+ return visit.CONTINUE;
129
+ }
123
130
  // find last html block
124
131
  let lastHtml = siblings.length - 1;
125
132
  while (lastHtml >= index) {