Skip to content

Commit 6853e92

Browse files
committed
refactor: remove hast conversion
1 parent 43a2816 commit 6853e92

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"glob": "^11.0.3",
5454
"hast-util-to-string": "^3.0.1",
5555
"hastscript": "^9.0.1",
56-
"mdast-util-to-hast": "^13.2.0",
5756
"reading-time": "^1.5.0",
5857
"recma-jsx": "^1.0.0",
5958
"rehype-recma": "^1.0.0",

src/generators/legacy-html/utils/buildContent.mjs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

33
import { h as createElement } from 'hastscript';
4-
import { toHast } from 'mdast-util-to-hast';
54
import { u as createTree } from 'unist-builder';
65
import { SKIP, visit } from 'unist-util-visit';
76

@@ -89,15 +88,12 @@ const createHistoryTableRow = (
8988
) => {
9089
const descriptionNode = remark.parse(description);
9190

92-
// Convert node to hast to make it compatible with createElement
93-
const descriptionHast = toHast(descriptionNode);
94-
9591
return createElement('tr', [
9692
createElement(
9793
'td',
9894
Array.isArray(changeVersions) ? changeVersions.join(', ') : changeVersions
9995
),
100-
createElement('td', descriptionHast),
96+
createElement('td', descriptionNode),
10197
]);
10298
};
10399

0 commit comments

Comments
 (0)