@adobe/helix-docx2md 1.0.19 → 1.0.22
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 +21 -0
- package/package.json +6 -6
- package/src/dast2mdast/handlers/paragraph.js +10 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [1.0.22](https://github.com/adobe/helix-docx2md/compare/v1.0.21...v1.0.22) (2022-07-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update dependency @adobe/helix-markdown-support to v3.1.8 ([0884578](https://github.com/adobe/helix-docx2md/commit/0884578e7fb5e190e4791972fd307242485a55d2))
|
|
7
|
+
|
|
8
|
+
## [1.0.21](https://github.com/adobe/helix-docx2md/compare/v1.0.20...v1.0.21) (2022-07-26)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* proper handling of nested lists ([#98](https://github.com/adobe/helix-docx2md/issues/98)) ([250eee0](https://github.com/adobe/helix-docx2md/commit/250eee074a31eec756fc2a83da3ed5bb4168fa74)), closes [#97](https://github.com/adobe/helix-docx2md/issues/97)
|
|
14
|
+
|
|
15
|
+
## [1.0.20](https://github.com/adobe/helix-docx2md/compare/v1.0.19...v1.0.20) (2022-07-09)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **deps:** update dependency @adobe/helix-markdown-support to v3.1.7 ([a74c8e3](https://github.com/adobe/helix-docx2md/commit/a74c8e37a76a64e567e2c7219b2953ff1abc86f7))
|
|
21
|
+
|
|
1
22
|
## [1.0.19](https://github.com/adobe/helix-docx2md/compare/v1.0.18...v1.0.19) (2022-07-02)
|
|
2
23
|
|
|
3
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-docx2md",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22",
|
|
4
4
|
"description": "Helix library that converts word documents to markdown",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://github.com/adobe/helix-docx2md#readme",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@adobe/helix-markdown-support": "3.1.
|
|
37
|
+
"@adobe/helix-markdown-support": "3.1.8",
|
|
38
38
|
"@adobe/helix-shared-process-queue": "1.1.5",
|
|
39
39
|
"@adobe/mammoth": "1.4.15-bleeding.1",
|
|
40
40
|
"dirname-filename-esm": "1.1.1",
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@adobe/eslint-config-helix": "1.3.2",
|
|
53
|
-
"@adobe/helix-mediahandler": "1.0.
|
|
53
|
+
"@adobe/helix-mediahandler": "1.0.36",
|
|
54
54
|
"@semantic-release/changelog": "6.0.1",
|
|
55
55
|
"@semantic-release/exec": "6.0.3",
|
|
56
56
|
"@semantic-release/git": "10.0.1",
|
|
57
|
-
"c8": "7.
|
|
57
|
+
"c8": "7.12.0",
|
|
58
58
|
"dotenv": "16.0.1",
|
|
59
|
-
"eslint": "8.
|
|
59
|
+
"eslint": "8.20.0",
|
|
60
60
|
"eslint-plugin-header": "3.1.1",
|
|
61
61
|
"eslint-plugin-import": "2.26.0",
|
|
62
62
|
"husky": "8.0.1",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"mocha": "10.0.0",
|
|
66
66
|
"mocha-multi-reporters": "1.5.1",
|
|
67
67
|
"semantic-release": "19.0.3",
|
|
68
|
-
"unist-util-inspect": "7.0.
|
|
68
|
+
"unist-util-inspect": "7.0.1"
|
|
69
69
|
},
|
|
70
70
|
"lint-staged": {
|
|
71
71
|
"*.js": "eslint"
|
|
@@ -87,23 +87,29 @@ export default function paragraph(h, node, parent, siblings) {
|
|
|
87
87
|
const { numId = 0, isOrdered = false, level = '0' } = numbering;
|
|
88
88
|
const lvl = Number.parseInt(level, 10);
|
|
89
89
|
let result = null;
|
|
90
|
-
|
|
90
|
+
const listProps = {
|
|
91
|
+
ordered: isOrdered,
|
|
92
|
+
spread: false,
|
|
93
|
+
level: lvl,
|
|
94
|
+
};
|
|
91
95
|
// find correct parent
|
|
92
96
|
let tail;
|
|
93
97
|
while (lists.length > 0) {
|
|
94
98
|
tail = lists.pop();
|
|
95
|
-
if (tail.ordered
|
|
99
|
+
if (tail.ordered !== isOrdered && tail.level === lvl) {
|
|
100
|
+
tail = null;
|
|
101
|
+
} else if (lists.length <= lvl) {
|
|
96
102
|
break;
|
|
97
103
|
}
|
|
98
104
|
tail = null;
|
|
99
105
|
}
|
|
100
106
|
if (!tail) {
|
|
101
|
-
tail = h('list',
|
|
107
|
+
tail = h('list', listProps, []);
|
|
102
108
|
result = tail;
|
|
103
109
|
}
|
|
104
110
|
lists.push(tail);
|
|
105
111
|
while (lists.length <= lvl) {
|
|
106
|
-
const newList = h('list',
|
|
112
|
+
const newList = h('list', listProps, []);
|
|
107
113
|
if (tail.children.length > 0) {
|
|
108
114
|
// append new list to end of the last list item
|
|
109
115
|
tail.children[tail.children.length - 1].children.push(newList);
|