Skip to content

Commit a40eab9

Browse files
nperez0111claude
andcommitted
feat: replace unified.js ecosystem with custom markdown parser/serializer
Replace the remark/rehype/unified pipeline (~89 transitive packages) with two custom, zero-dependency files for markdown↔HTML conversion. The unified ecosystem was overkill for BlockNote's bounded feature set and required 6 custom plugins to work around its abstractions. New files: - markdownToHtml.ts: block tokenizer + inline parser with recursive list handling - htmlToMarkdown.ts: DOM-based serializer with proper list nesting and table support Removes 12 direct dependencies: unified, remark-parse, remark-stringify, remark-gfm, remark-rehype, rehype-parse, rehype-stringify, rehype-remark, rehype-format, hast-util-from-dom, unist-util-visit, @types/hast Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 38be5fd commit a40eab9

263 files changed

Lines changed: 12014 additions & 904 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/core/package.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,31 +107,19 @@
107107
"@tiptap/pm": "^3.13.0",
108108
"emoji-mart": "^5.6.0",
109109
"fast-deep-equal": "^3.1.3",
110-
"hast-util-from-dom": "^5.0.1",
111110
"prosemirror-highlight": "^0.15.1",
112111
"prosemirror-model": "^1.25.4",
113112
"prosemirror-state": "^1.4.4",
114113
"prosemirror-tables": "^1.8.3",
115114
"prosemirror-transform": "^1.11.0",
116115
"prosemirror-view": "^1.41.4",
117-
"rehype-format": "^5.0.1",
118-
"rehype-parse": "^9.0.1",
119-
"rehype-remark": "^10.0.1",
120-
"rehype-stringify": "^10.0.1",
121-
"remark-gfm": "^4.0.1",
122-
"remark-parse": "^11.0.0",
123-
"remark-rehype": "^11.1.2",
124-
"remark-stringify": "^11.0.0",
125-
"unified": "^11.0.5",
126-
"unist-util-visit": "^5.0.0",
127116
"uuid": "^8.3.2",
128117
"y-prosemirror": "^1.3.7",
129118
"y-protocols": "^1.0.6",
130119
"yjs": "^13.6.27"
131120
},
132121
"devDependencies": {
133122
"@types/emoji-mart": "^3.0.14",
134-
"@types/hast": "^3.0.4",
135123
"@types/uuid": "^8.3.4",
136124
"eslint": "^8.57.1",
137125
"jsdom": "^25.0.1",

0 commit comments

Comments
 (0)