diff --git a/packages/shared/package.json b/packages/shared/package.json index 60e7141..bd3b662 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -25,9 +25,15 @@ "test": "vitest run --passWithNoTests" }, "dependencies": { + "markdown-it": "^14.3.0", + "prosemirror-markdown": "^1.13.4", + "prosemirror-model": "^1.25.9", + "prosemirror-tables": "^1.8.5", "zod": "^3.24.0" }, "devDependencies": { + "@types/markdown-it": "^14.1.2", + "@types/node": "^26.1.0", "tsup": "^8.3.0", "vitest": "^3.0.0" } diff --git a/packages/shared/src/editor-schema/html.test.ts b/packages/shared/src/editor-schema/html.test.ts new file mode 100644 index 0000000..62e57d6 --- /dev/null +++ b/packages/shared/src/editor-schema/html.test.ts @@ -0,0 +1,48 @@ +import { describe, expect, it } from 'vitest'; + +import { docToHtml } from './html'; +import { markdownToDoc } from './markdown'; +import { editorSchema } from './schema'; + +describe('docToHtml (issue #24)', () => { + it('escapes text content, including angle brackets and quotes', () => { + const doc = markdownToDoc('Contains literally.'); + const html = docToHtml(doc); + expect(html).not.toContain('