Skip to content

Commit 862b4be

Browse files
committed
refactor: remove legacy stuff
1 parent 3052002 commit 862b4be

File tree

3 files changed

+1
-98
lines changed

3 files changed

+1
-98
lines changed

Diff for: src/node/markdown/math.ts

-89
This file was deleted.

Diff for: src/node/markdown/plugins/link.ts

-7
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ export const linkPlugin = (
6060
hrefAttr[1] = `${base}${hrefAttr[1]}`.replace(/\/+/g, '/')
6161
}
6262
}
63-
64-
// encode vite-specific replace strings in case they appear in URLs
65-
// this also excludes them from build-time replacements (which injects
66-
// <wbr/> and will break URLs)
67-
hrefAttr[1] = hrefAttr[1]
68-
.replace(/\bimport\.meta/g, 'import%2Emeta')
69-
.replace(/\bprocess\.env/g, 'process%2Eenv')
7063
}
7164
return self.renderToken(tokens, idx, options)
7265
}

Diff for: src/node/plugin.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
resolveAliases
1717
} from './alias'
1818
import { resolvePages, resolveUserConfig, type SiteConfig } from './config'
19-
import { mathjaxElements } from './markdown/math'
2019
import {
2120
clearCache,
2221
createMarkdownToVueRenderFn,
@@ -88,7 +87,7 @@ export async function createVitePressPlugin(
8887

8988
if (markdown?.math) {
9089
isCustomElement = (tag) => {
91-
if (mathjaxElements.includes(tag)) {
90+
if (['mjx-container', 'mjx-assistive-mml'].includes(tag)) {
9291
return true
9392
}
9493
return userCustomElementChecker?.(tag) ?? false

0 commit comments

Comments
 (0)