diff --git a/apps/web/src/components/ui/report/editor-kit.ts b/apps/web/src/components/ui/report/editor-kit.ts index 140535b91..c0cc9c761 100644 --- a/apps/web/src/components/ui/report/editor-kit.ts +++ b/apps/web/src/components/ui/report/editor-kit.ts @@ -28,7 +28,7 @@ import { LineHeightKit } from './plugins/line-height-kit'; import { LinkKit } from './plugins/link-kit'; import { ListKit } from './plugins/list-kit'; import { MarkdownKit } from './plugins/markdown-kit'; -import { MathKit } from './plugins/math-kit'; +// import { MathKit } from './plugins/math-kit'; import { MediaKit } from './plugins/media-kit'; import { MentionKit } from './plugins/mention-kit'; import { SlashKit } from './plugins/slash-kit'; @@ -58,7 +58,7 @@ export const EditorKit = [ ...MediaKit, ...CalloutKit, ...ColumnKit, - ...MathKit, + // ...MathKit, ...DateKit, ...LinkKit, ...MentionKit, diff --git a/packages/server-utils/src/report/platejs-conversion.test.ts b/packages/server-utils/src/report/platejs-conversion.test.ts index a9e2d210d..a3a80d244 100644 --- a/packages/server-utils/src/report/platejs-conversion.test.ts +++ b/packages/server-utils/src/report/platejs-conversion.test.ts @@ -201,6 +201,59 @@ Here's an unordered list: expect((thirdElement as ParagraphElement).listStyleType).toBe('disc'); expect(thirdElement.children[0]).toEqual({ text: 'Bullet list item 2' }); }); + + it('dollar sign', async () => { + const markdown = `Top performers balance volume and value across purchase contexts: +- **High-volume replacement parts** (1,088 orders, $16M revenue) +- **High-value maintenance & upgrade** (535 orders, $21.4M revenue)`; + + const platejs = await markdownToPlatejs(markdown); + expect(platejs.error).toBeUndefined(); + expect(platejs.elements).toBeDefined(); + const firstElement = platejs.elements[0]; + expect(firstElement.type).toBe('p'); + expect(firstElement.children[0]).toEqual({ + text: 'Top performers balance volume and value across purchase contexts:', + }); + expect(platejs.elements).toEqual([ + { + children: [ + { + text: 'Top performers balance volume and value across purchase contexts:', + }, + ], + type: 'p', + }, + { + children: [ + { + bold: true, + text: 'High-volume replacement parts', + }, + { + text: ' (1,088 orders, $16M revenue)', + }, + ], + type: 'p', + indent: 1, + listStyleType: 'disc', + }, + { + children: [ + { + bold: true, + text: 'High-value maintenance & upgrade', + }, + { + text: ' (535 orders, $21.4M revenue)', + }, + ], + type: 'p', + indent: 1, + listStyleType: 'disc', + }, + ]); + }); }); describe('platejsToMarkdown', () => {