Skip to content

Commit 2c558d6

Browse files
authored
chore: remove math plugin since we provides latex in crepe (#1617)
* chore: remove math plugin since we provides latex in crepe * chore: remove unused
1 parent 410e220 commit 2c558d6

File tree

15 files changed

+0
-1653
lines changed

15 files changed

+0
-1653
lines changed

Diff for: e2e/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"@milkdown/plugin-emoji": "workspace:*",
2525
"@milkdown/plugin-history": "workspace:*",
2626
"@milkdown/plugin-listener": "workspace:*",
27-
"@milkdown/plugin-math": "workspace:*",
2827
"@milkdown/plugin-tooltip": "workspace:*",
2928
"@milkdown/preset-commonmark": "workspace:*",
3029
"@milkdown/preset-gfm": "workspace:*",

Diff for: e2e/src/data.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { multiEditor } from './multi-editor'
22
import { automd } from './plugin-automd'
3-
import { math } from './plugin-math'
43
import { listener } from './plugin-listener'
54
import { commonmark } from './preset-commonmark'
65
import { gfm } from './preset-gfm'
@@ -11,5 +10,4 @@ export const cases: { title: string; link: string }[] = [
1110
multiEditor,
1211
listener,
1312
automd,
14-
math,
1513
]

Diff for: e2e/src/plugin-automd/main.ts

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { listener, listenerCtx } from '@milkdown/plugin-listener'
44
import { automd } from '@milkdown/plugin-automd'
55
import { commonmark, markInputRules } from '@milkdown/preset-commonmark'
66
import { markInputRules as GFMMarkInputRules, gfm } from '@milkdown/preset-gfm'
7-
import { math, mathInlineInputRule } from '@milkdown/plugin-math'
87

98
import { setup } from '../utils'
109

@@ -24,7 +23,6 @@ setup(() => {
2423
.config(nord)
2524
.use(commonmark.filter((x) => !markInputRules.includes(x)))
2625
.use(gfm.filter((x) => !GFMMarkInputRules.includes(x)))
27-
.use(math.filter((x) => x !== mathInlineInputRule))
2826
.use(listener)
2927
.use(automd)
3028
.create()

Diff for: e2e/src/plugin-math/index.html

-27
This file was deleted.

Diff for: e2e/src/plugin-math/index.ts

-4
This file was deleted.

Diff for: e2e/src/plugin-math/main.ts

-21
This file was deleted.

Diff for: e2e/tests/plugin/automd.spec.ts

-22
Original file line numberDiff line numberDiff line change
@@ -154,25 +154,3 @@ test('with plugin listener', async ({ page }) => {
154154
const [msg4] = msg.args()
155155
expect(await msg4?.jsonValue()).toBe('*A*\n')
156156
})
157-
158-
test.describe('with inline math', () => {
159-
test('basic input', async ({ page }) => {
160-
await focusEditor(page)
161-
await page.keyboard.type('$E = MC^2$')
162-
await expect(page.locator('span[data-type="math_inline"]')).toHaveAttribute(
163-
'data-value',
164-
'E = MC^2'
165-
)
166-
expect(await getMarkdown(page)).toBe('$E = MC^2$\n')
167-
})
168-
169-
test('input with _', async ({ page }) => {
170-
await focusEditor(page)
171-
await page.keyboard.type('test $a$')
172-
await expect(page.locator('span[data-type="math_inline"]')).toHaveAttribute(
173-
'data-value',
174-
'a'
175-
)
176-
expect(await getMarkdown(page)).toBe('test $a$\n')
177-
})
178-
})

0 commit comments

Comments
 (0)