Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove math plugin since we provides latex in crepe #1617

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@milkdown/plugin-emoji": "workspace:*",
"@milkdown/plugin-history": "workspace:*",
"@milkdown/plugin-listener": "workspace:*",
"@milkdown/plugin-math": "workspace:*",
"@milkdown/plugin-tooltip": "workspace:*",
"@milkdown/preset-commonmark": "workspace:*",
"@milkdown/preset-gfm": "workspace:*",
Expand Down
2 changes: 0 additions & 2 deletions e2e/src/data.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { multiEditor } from './multi-editor'
import { automd } from './plugin-automd'
import { math } from './plugin-math'
import { listener } from './plugin-listener'
import { commonmark } from './preset-commonmark'
import { gfm } from './preset-gfm'
Expand All @@ -11,5 +10,4 @@ export const cases: { title: string; link: string }[] = [
multiEditor,
listener,
automd,
math,
]
2 changes: 0 additions & 2 deletions e2e/src/plugin-automd/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { listener, listenerCtx } from '@milkdown/plugin-listener'
import { automd } from '@milkdown/plugin-automd'
import { commonmark, markInputRules } from '@milkdown/preset-commonmark'
import { markInputRules as GFMMarkInputRules, gfm } from '@milkdown/preset-gfm'
import { math, mathInlineInputRule } from '@milkdown/plugin-math'

import { setup } from '../utils'

Expand All @@ -24,7 +23,6 @@ setup(() => {
.config(nord)
.use(commonmark.filter((x) => !markInputRules.includes(x)))
.use(gfm.filter((x) => !GFMMarkInputRules.includes(x)))
.use(math.filter((x) => x !== mathInlineInputRule))
.use(listener)
.use(automd)
.create()
Expand Down
27 changes: 0 additions & 27 deletions e2e/src/plugin-math/index.html

This file was deleted.

4 changes: 0 additions & 4 deletions e2e/src/plugin-math/index.ts

This file was deleted.

21 changes: 0 additions & 21 deletions e2e/src/plugin-math/main.ts

This file was deleted.

22 changes: 0 additions & 22 deletions e2e/tests/plugin/automd.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,25 +154,3 @@ test('with plugin listener', async ({ page }) => {
const [msg4] = msg.args()
expect(await msg4?.jsonValue()).toBe('*A*\n')
})

test.describe('with inline math', () => {
test('basic input', async ({ page }) => {
await focusEditor(page)
await page.keyboard.type('$E = MC^2$')
await expect(page.locator('span[data-type="math_inline"]')).toHaveAttribute(
'data-value',
'E = MC^2'
)
expect(await getMarkdown(page)).toBe('$E = MC^2$\n')
})

test('input with _', async ({ page }) => {
await focusEditor(page)
await page.keyboard.type('test $a$')
await expect(page.locator('span[data-type="math_inline"]')).toHaveAttribute(
'data-value',
'a'
)
expect(await getMarkdown(page)).toBe('test $a$\n')
})
})
Loading
Loading