@adobe/helix-importer 3.1.2 → 3.1.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
+ ## [3.1.4](https://github.com/adobe/helix-importer/compare/v3.1.3...v3.1.4) (2024-01-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * import comments cleanup logic ([#290](https://github.com/adobe/helix-importer/issues/290)) ([deec675](https://github.com/adobe/helix-importer/commit/deec675c6e88f0035a3d5b3d88b4068f106a8f80))
7
+
8
+ ## [3.1.3](https://github.com/adobe/helix-importer/compare/v3.1.2...v3.1.3) (2024-01-06)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **deps:** update adobe fixes ([#286](https://github.com/adobe/helix-importer/issues/286)) ([27acb37](https://github.com/adobe/helix-importer/commit/27acb37aacf312dfbbaca8338bddec7e5a69e46e))
14
+
1
15
  ## [3.1.2](https://github.com/adobe/helix-importer/compare/v3.1.1...v3.1.2) (2023-12-30)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-importer",
3
- "version": "3.1.2",
3
+ "version": "3.1.4",
4
4
  "description": "Helix Importer tool: create md / docx from html",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -29,7 +29,7 @@
29
29
  "devDependencies": {
30
30
  "@adobe/eslint-config-helix": "2.0.5",
31
31
  "@adobe/helix-docx2md": "1.5.0",
32
- "@adobe/helix-mediahandler": "2.4.3",
32
+ "@adobe/helix-mediahandler": "2.4.5",
33
33
  "@esm-bundle/chai": "4.3.4-fix.0",
34
34
  "@semantic-release/changelog": "6.0.3",
35
35
  "@semantic-release/exec": "6.0.3",
@@ -37,12 +37,12 @@
37
37
  "@web/test-runner": "0.18.0",
38
38
  "@web/test-runner-commands": "0.9.0",
39
39
  "@web/test-runner-mocha": "0.9.0",
40
- "c8": "8.0.1",
41
- "chai": "4.3.10",
40
+ "c8": "9.1.0",
41
+ "chai": "5.0.0",
42
42
  "dirname-filename-esm": "1.1.1",
43
43
  "eslint": "8.56.0",
44
44
  "husky": "8.0.3",
45
- "jsdom": "23.0.1",
45
+ "jsdom": "23.2.0",
46
46
  "lint-staged": "15.2.0",
47
47
  "mocha": "10.2.0",
48
48
  "mocha-multi-reporters": "1.5.1",
@@ -54,7 +54,7 @@
54
54
  "license": "Apache-2.0",
55
55
  "dependencies": {
56
56
  "@adobe/helix-markdown-support": "7.1.0",
57
- "@adobe/helix-md2docx": "2.1.38",
57
+ "@adobe/helix-md2docx": "2.1.39",
58
58
  "@adobe/mdast-util-gridtables": "3.0.2",
59
59
  "@adobe/remark-gridtables": "2.0.2",
60
60
  "form-data": "4.0.0",
@@ -139,7 +139,8 @@ export default class DOMUtils {
139
139
  // eslint-disable-next-line no-param-reassign
140
140
  document.body.innerHTML = document.body.innerHTML
141
141
  // remove html comments
142
- .replace(/<!--(?!>)[\S\s]*?-->/gm, '');
142
+ .replace(/><!--(?!>)[\S\s]*?-->/gm, '>')
143
+ .replace(/\n<!--(?!>)[\S\s]*?-->/gm, '\n');
143
144
  }
144
145
 
145
146
  static removeSpans(document) {
@@ -182,6 +182,8 @@ describe('DOMUtils#removeCommments tests', () => {
182
182
  test('<p><!-- useless comment \n multiline --></p>', '<p></p>');
183
183
  test('<p><!-- useless comment \n multiline \n multiline --></p>', '<p></p>');
184
184
  test('<!-- useless comment --><p>The content stays</p><!-- another useless comment with \n line break -->', '<p>The content stays</p>');
185
+ test('<p>This is a paragraph.</p>\n\x3C!--\n<p>Look at this cool image:</p>\n<img border="0" src="pic_trulli.jpg" alt="Trulli">\n-->\n<p>This is a paragraph too.</p>\x3C!-- same line -->\n\x3C!-- single line -->', '<p>This is a paragraph.</p>\n\n<p>This is a paragraph too.</p>\n');
186
+ test('<div some-crazy-attribute="" <!--=""><!-- useless comment --></div>', '<div some-crazy-attribute="" <!--=""></div>');
185
187
  });
186
188
  });
187
189